I'm currently trying to parse a date, and I took the following example from the javadoc (http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html) :
Format : "EEE, d MMM yyyy HH:mm:ss Z" Date : Wed, 4 Jul 2001 12:08:56 -0700
To parse this date I'm currently doing the following :
new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss Z").parse("Wed, 4 Jul 2001 12:08:56 -0700")
But I get an exception
java.text.ParseException: Unparseable date: "Wed, 4 Jul 2001 12:08:56 -0700"
. What am I doing wrong ?
Thanks a lot for your help :)
MMM
doesn't meanJul
that it could be expecting07
? – ddavisonSystem.out.println(Locale.getDefault())
). If you're let's say, in a French locale, then this english date won't be parseable. – JB Nizet