What SimpleDateFormat to use for parsing Oracle date ?
I’m using this SimpleDateFormat.
SimpleDateFormat dateFormat = new SimpleDateFormat(“yyyy/mm/dd hh:mm:ss.sss”);
its giving this exception.
java.text.ParseException: Unparseable date: “2011-08-19 06:11:03.0”
Kindly please tell me the SimpleDateFormat to use. Thanks.
You should use this Pattern
"yyyy-MM-dd HH:mm:ss.S"instead of"yyyy/mm/dd hh:mm:ss.sss".little
hfor “Hour in am/pm (1-12)” andHfor “Hour in day (0-23)”see here: SimpleDateFormat