Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to parse this date

I am getting dates in this format 14-MAY-13 01.17.16.250000 PM and

SimpleDateFormat simpleDateFormat = new SimpleDateFormat("dd-MMM-yy hh:mm:ss aaa");
  simpleDateFormat.parse("14-MAY-13 01.17.16.250000 PM")

Gives me this exception

java.text.ParseException: Unparseable date: "14-MAY-13 01.17.16.250000 PM" ..What should be format of simpledateformat?

like image 720
user1224036 Avatar asked Dec 10 '25 00:12

user1224036


1 Answers

Try

new SimpleDateFormat("dd-MMM-yy hh.mm.ss.SSSSSS aaa");
like image 186
darijan Avatar answered Dec 11 '25 14:12

darijan