This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
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: 14194
    
  20

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 8 API documentation
laura mccord
Ranch Hand

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

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

 
GeeCON Prague 2014
 
subject: Stumped on my SimpleDateFormat issue