I can't get dates to parse with any accuracy. I have a date like this,
for example:
Fri May 25 07:58:46 GMT 2007
I am using a SimpleDateFormat with a format string of:
EEE MMM dd HH:MM:SS z yyyy
When I parse the date and print it back out, it thinks it was:
Tue Oct 25 02:00:00 CDT 2011
Which is not even remotely the same except for the "25".
Any tips on using the date parser? I guess I could just extract all the
fields into integers and make a date out of that, but it seems like
there is built-in functionality for this and I want it to work!
Thanks,
Jeremy
Jeremy <jeremy@pinacol.com> wrote in news:6%n5i.11406$qJ1.8078
@newsfe18.lga:
> I can't get dates to parse with any accuracy. I have a date like this,
> for example:
[quoted text clipped - 8 lines]
>
> Tue Oct 25 02:00:00 CDT 2011
Your format string is wrong , try :
EEE MMM dd HH:mm:ss z yyyy
Bye.

Signature
Real Gagnon from Quebec, Canada
* Java, Javascript, VBScript and PowerBuilder code snippets
* http://www.rgagnon.com/howto.html
* http://www.rgagnon.com/bigindex.html
Jeremy - 25 May 2007 18:10 GMT
> Your format string is wrong , try :
>
> EEE MMM dd HH:mm:ss z yyyy
>
> Bye.
Yep, you're right. Thanks for spotting that.
Jeremy