Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Stumped on my SimpleDateFormat issue

 
laura mccord
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15214
36
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The format must be: yyyy-MM-dd

mm (lower-case) means minutes, MM (upper-case) means months.
 
laura mccord
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank You.

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

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic