This discussion is archived
2 Replies Latest reply: Apr 29, 2007 3:49 PM by 807606 RSS

JavaScript toGMTString convertion to SimpleDateFormat

807606 Newbie
Currently Being Moderated

I'm getting an string like this: "Sun, 25 Mar 2007 13:36:54 GMT".
This string comes from another software created with JavaScript and uses Date.toGMTString() method.
I want to get an java.util.Date using this code:

SimpleDateFormat FORMAT = new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss z");
Date D = FORMAT.parse("Sun, 25 Mar 2007 13:36:54 GMT");

And I'm continuous getting "Unparseable date". Why?

Thanks! :D