aspose file tools*
The moose likes Java in General and the fly likes How to convert date in one locale to another locale Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "How to convert date in one locale to another locale" Watch "How to convert date in one locale to another locale" New topic
Author

How to convert date in one locale to another locale

soni lal
Greenhorn

Joined: Jan 31, 2011
Posts: 29
Hi All,


One requirement is there in my project : to convert date from one locale to another locale.

e.g If the current geo locale is fr_FR then, the default date will come in french but, as per the business logic of application this date needs to be changed as per the locale coming from DB and the converted date will be shown to user.

From net I got that I can include one jar file : google-api-translate-java.jar. which provides API for interlocale date conversion but, In my project it is not possible to include one extra jar file.

Please suggest me if you have any other idea to do this. I am eagerly waiting for the reply.

Thanks in advance!!




Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1478
    
    6

Does this help??


Swastik
soni lal
Greenhorn

Joined: Jan 31, 2011
Posts: 29
Hi Swastik,

Thanks for the reply!!
I have to convert date from one locale to another.

e.g If the locale is ja_JP then the date is coming like this : 08 10月, 2010

but the locale coming from DB is de_DE then, I have to convert 08 10月, 2010 into de_De format i.e : 08 Oktober, 2010

I am not getting that how this code will help.


Please let me know if you have any idea.
Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1478
    
    6

Can it be something like tihs?

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to convert date in one locale to another locale