This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Other JSE/JEE APIs and the fly likes Get the Date Format of particular country using country code Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Get the Date Format of particular country using country code" Watch "Get the Date Format of particular country using country code" New topic
Author

Get the Date Format of particular country using country code

sivakumar panchu
Greenhorn

Joined: Jul 18, 2007
Posts: 20
Hi ,

I want to get the date format (Example: dd/mm/yyyy,....) of the particular country using country code and language code.

Please help me
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19654
    
  18

I don't know if you can get that, but if you need it for formatting and parsing Date objects, you can use one of the static methods in java.text.DateFormat.

First create a Locale object, or retrieve one of the default ones. Then call DateFormat.getDateInstance, DateFormat.getDateTimeInstance or DateFormat.getTimeInstance using the Locale object. You may have to experiment a bit with the different styles.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
sivakumar panchu
Greenhorn

Joined: Jul 18, 2007
Posts: 20
Thanks prime
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Get the Date Format of particular country using country code
 
Similar Threads
How to convert Timestampformat to another format
Date format... please help
Unable to get Date instance in a particular format
how do i get day of the week from the date
Date format