We would like to know how to show a date in french format.
import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; //from w w w .j av a 2 s . com public class Main { public static void main(String[] args) { String timeStamp = new SimpleDateFormat("EEE MMM dd hh:mm:ss yyyy", Locale.FRANCE).format(new Date()); System.out.println(timeStamp); } }
The code above generates the following result.