• Post Reply Bookmark Topic Watch Topic
  • New Topic

SimpleDateFormat giving an error  RSS feed

 
Anjali S Sharma
Ranch Hand
Posts: 279
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have following code using SimpleDateFormat



The date being returned in strAED is "7/30/2009 04:11:57".

When I run this code, it gives me the following error


Can someone please let me know what could be the reason for this and how to resolve this.

Thank you
 
Janeice DelVecchio
Bartender
Posts: 1812
12
Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am pretty sure that the 'a' at the end of


means you need to include an am or pm. if you don't need this, then I think you might have to exclude the 'a'
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Correct; the input doesn't match the input you're providing.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!