This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Java in General and the fly likes Solution for Unparsable Date Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Solution for Unparsable Date Exception" Watch "Solution for Unparsable Date Exception" New topic
Author

Solution for Unparsable Date Exception

Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1261
the parameter I am sending is a string 09/01/2009. The following code returns an Unparsable Date "09/01/2009". Please help resolve this.

Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 16815
    
  19



Your date parser is configured to take a date of the format "MMM-yy" or the month, followed by a dash, followed by two digits that represents the year. This is complete different, in term of format, to what you are actually sending to it.

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Solution for Unparsable Date Exception
 
Similar Threads
add 10 days to currentDate in java.util.Date or cast to Calendar?
Mapping Java Date to an Oracle Date.
Datewise File search
Getting Exception in calling webservice
is date valid