GeeCON Prague 2014*
The moose likes Beginning Java and the fly likes Date format Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Date format " Watch "Date format " New topic
Author

Date format

sivakumar panchu
Greenhorn

Joined: Jul 18, 2007
Posts: 20
Hi,

I want to know how to get the date format of particular country.

Based on countrycode or language code.
Amit Ghorpade
Bartender

Joined: Jun 06, 2007
Posts: 2716
    
    6

Use the DateFormat class.


Hope this helps


SCJP, SCWCD.
|Asking Good Questions|
Santhosh Kumar
Ranch Hand

Joined: Nov 07, 2000
Posts: 242
I'm not sure if there is any predefined 'format string' constants in Java API but sure you can get anything you want by defining your own formats. This Wikipedia article may come in handy.
Mark Vedder
Ranch Hand

Joined: Dec 17, 2003
Posts: 624

The SimpleDateFormat implementation of the DateFormat class Amit mentioned can change the formatting based on the Locale. See the Java Tutorial pages on the Formatting Dates and Times for more information.
sivakumar panchu
Greenhorn

Joined: Jul 18, 2007
Posts: 20
Thank you
 
GeeCON Prague 2014
 
subject: Date format