• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Unparseable date exception

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?

 
Author
Posts: 375
22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Mala,

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

Cheers,
Divya
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic