parsing - I am getting Error 500: java.text.ParseException: Unparseable date: "2013-07-18 16:57:22.0" -


string date = "2013-07-18 16:57:22.0"; dateformat format = new simpledateformat("yyyy-mm-dd hh24:mm:ssss.ff6"); date datetime=format.parse(date); calendar calendar = calendar.getinstance(format.gettimezone()); calendar.settime(datetime); 

and getting error

error 500: java.text.parseexception: unparseable date: "2013-07-18 16:57:22.0"

i'm unsure hh24 part of format meant do: hh means need hour of day in 24 hours format.

by same token, ff6 bit supposed achieve? according documentation, f day of week in month, there particular reason put after seconds? 6 part meant do?

ssss bit odd - want milliseconds on 4 digits number (the maximum value 999, isn't it?), not seconds?

try , build format logically documentation - believe you'll end similar @davioooh suggesting.


Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -