Date and Time Format Example
This Example shows you date and time format according to the locale. In the code given below we are displaying data and time format according to the locale.Methods used in this example are described below :
DateFormat.getDateInstance() : DateFormat class is used for date and time format and getDateInstance() method is used for gets DateFormat class object with the given formatting style for the given locale.
DateFormat.format() : format method is used for format Date into date/time String.
DateFormatExample.java
import java.text.*;
|
Output :
10 sept. 2008 fr_FR
|
Download code