File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Stumped on my SimpleDateFormat issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Stumped on my SimpleDateFormat issue" Watch "Stumped on my SimpleDateFormat issue" New topic
Author

Stumped on my SimpleDateFormat issue

laura mccord
Ranch Hand

Joined: Feb 10, 2009
Posts: 108
I have to two strings that I am trying to convert into a date type. The first date works perfectly but the second date the month is not converting correctly.




My results appear as :

startWeek: Sun Jan 30 00:01:00 CST 2011
endWeek: Wed Jan 05 00:02:00 CST 2011

What am I overlooking?

Thanks
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14144
    
  18

The format must be: yyyy-MM-dd

mm (lower-case) means minutes, MM (upper-case) means months.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
laura mccord
Ranch Hand

Joined: Feb 10, 2009
Posts: 108
Thank You.

That was a dumb mistake on my part that I overlooked.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Stumped on my SimpleDateFormat issue