• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unparseable date exception

 
Divya Sanjeev
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I tried this piece of code but it is giving me Unparseable date exception. Can you please help me out?

 
Mala Gupta
Author
Ranch Hand
Posts: 291
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Divya,

Please use the code tag to post your tag. This tag retains the code indentation.

The format of your date 'dd-MMM-yyyy' does not matches with the exact value that you pass to it, i.e., '21JUN2010'. Either remove hyphens from the date format, or add hyphens to the actual date value.

Date format 'dd-MMM-yyyy' will correctly parse value '21-JUN-2010'. And Date format 'ddMMMyyyy' will correctly parse value '21JUN2010'

cheers
Mala
 
Divya Sanjeev
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mala,

Thanks a lot for the suggestion. I had missed hyphen in the date format.

Cheers,
Divya
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic