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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply 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: 80
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
Bartender

Joined: Aug 16, 2005
Posts: 12921
    
    3

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: 80
Thank You.

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

 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Stumped on my SimpleDateFormat issue
 
Similar Threads
Convert String to Date Issue
Handling a strange date format
problem with dates
problem while inserting date field in oracle data base
Time Zone problem