on 02-27-2007 10:05 AM
setDel_date(long l)
outboundpr.setDel_date(Long.parseLong(codes.getString("DELIV_DATE").trim()));
java.lang.NumberFormatException: For input string: "2006-12-15"
I had also faced the same problem ,
pl use this code ..
Date thedate;
thedate = new Date(System.currentTimeMillis());
outboundpr.setDel_date(thedate);
also set <b>type</b> of context vairable setDel_date to "date"
may this help you
Regards
Manoj Sahoo
Message was edited by:
Manoj Sahoo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
the problem is in
codes.getString("DELIV_DATE").trim()
it returns "2006-12-15"
)) how do u thik java will convert "2006-12-15" to some long value?
Solution:
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
java.util.Date asDate = sdf .parse(codes.getString("DELIV_DATE").trim());
outboundpr.setDel_date(asDate.getTime());
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.