• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

How to convert date in one locale to another locale

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!!




 
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does this help??
 
soni lal
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can it be something like tihs?

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@soni lal Hi, I have the same requirement. Did you get any solution or any kind of idea?
Thanks.
 
There’s no place like 127.0.0.1. But I'll always remember this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic