Skip to content
Advertisement

Unparseable date exception in java

These lines of codes

JavaScript

causees this exception

JavaScript

what is the possible solution ?

Advertisement

Answer

Your format is completely wrong. Not only are you using mm (which means minutes) when you probably meant MM, but this:

JavaScript

is clearly not in the format

JavaScript

You probably want something like

JavaScript

EDIT: That works for me in desktop Java:

JavaScript

You may want to set the culture of the SimpleDateFormat of course.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement