Meaningless Drivel is fun!
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

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Date format " Watch "Date format " New topic

Date format

sivakumar panchu

Joined: Jul 18, 2007
Posts: 20

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

Based on countrycode or language code.
Amit Ghorpade

Joined: Jun 06, 2007
Posts: 2837

Use the DateFormat class.

Hope this helps

|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

Joined: Jul 18, 2007
Posts: 20
Thank you
I agree. Here's the link:
subject: Date format
It's not a secret anymore!