This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java in General and the fly likes Exception: Unparseable date for different languages Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Exception: Unparseable date for different languages" Watch "Exception: Unparseable date for different languages" New topic
Author

Exception: Unparseable date for different languages

Steve Jiang
Ranch Hand

Joined: May 17, 2004
Posts: 107
I am using the following code to convert the date for different language, but it works for English and Japanse, but failed for Chinese and Korea with the error like "java.text.ParseException: Unparseable date: "2009-08-14 下午 10:00:01""


What will be better way to handle all kinds of language for Date format?


Mathew Lee
Ranch Hand

Joined: Jun 08, 2009
Posts: 238
i am not sure if you can do all kinds of languages
Steve Jiang
Ranch Hand

Joined: May 17, 2004
Posts: 107
The code is using as ORADateFormat to get the pattern , looks like it works for English, Japanese.

I have n't find the way to convert the ORADateformat pattern with simpledateformat, but I am guess it could have some way?


 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Exception: Unparseable date for different languages
 
Similar Threads
Date Parsing Issue...
Unusual date formatting problem
Convert String value to Date Object
issue with datetimepicker & autocompleter in struts 2
Unparseable date exception....!!!!