Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to convert date in one locale to another locale

 
soni lal
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1603
5
Android Java Java ME
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does this help??
 
soni lal
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1603
5
Android Java Java ME
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can it be something like tihs?

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic