my dog learned polymorphism*
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: 14074
    
  16

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.

 
 
subject: Stumped on my SimpleDateFormat issue
 
Similar Threads
problem while inserting date field in oracle data base
Time Zone problem
Convert String to Date Issue
Handling a strange date format
problem with dates