This is a discussion on how to convert yyyy-MM-dd HH:mm:ss to java.sql.Date within the MySQL Database forums, part of the Database Forums category; hi, how to convert date in this format yyyy-MM-dd HH:mm:ss to java.sql.Date if i ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
hi, how to convert date in this format yyyy-MM-dd HH:mm:ss to java.sql.Date if i use directly like this java.sql.Date.valueOf(processDate) am getting exception java.lang.NumberFormatException: For input string: "02 19:51:51" if anybody knows reply back immedietely. thanks in advance |
|
|||
|
On 2 Mar, 14:30, "sh" <shailajabt...@gmail.com> wrote:
> hi, > > how to convert date in this format yyyy-MM-dd HH:mm:ss to > java.sql.Date > > if i use directly like this java.sql.Date.valueOf(processDate) > > am getting exception java.lang.NumberFormatException: For input > string: "02 19:51:51" > > if anybody knows reply back immedietely. > > thanks in advance See: http://java.sun.com/j2se/1.4.2/docs/...va.lang.String) Looks like you need to take only the date part. |