Have String str “May 23 2011 12:20:00”, want to convert it to date such this:
Date date = (new SimpleDateFormat("MMM dd yyyy HH:mm:ss")).parse(str);
It always gives me ParseException Unparsable date format: ‘May 23 2011 12:20:00’.
Looked for similar issues, seems everything right.
What is wrong?
You may need to additionally specify the Locale, when the default Locale of your VM is not an English one: