1

How should I configure SimpleDateFormat in order to be able to parse the following date: Thu, 4 Apr 2013 00:00:00 CET

I tried: new SimpleDateFormat("EEE dd MMM yyyy HH:mm:ss z"); But it got the following exception:

ERROR java.text.ParseException:
Unparseable date: "Thu, 4 Apr 2013 00:00:00 CET"
Frohnzie
  • 3,559
  • 1
  • 21
  • 24
Zlatko
  • 1,297
  • 1
  • 12
  • 22

1 Answers1

3

You seem to be missing a comma. Try:

SimpleDateFormat sf = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z");
Date d = sf.parse("Thu, 4 Apr 2013 00:00:00 CET")
Frohnzie
  • 3,559
  • 1
  • 21
  • 24