• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Date format

 
sivakumar panchu
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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

Based on countrycode or language code.
 
Amit Ghorpade
Bartender
Posts: 2854
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use the DateFormat class.


Hope this helps
 
Santhosh Kumar
Ranch Hand
Posts: 242
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 624
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic