|
Oct
01
|
Either use the format() method of the SimpleDateFormat class, or the (static) format() method of the String class.
DateFormat dateFormat = new SimpleDateFormat("hhmmddMMyy");
Date today = new Date();
String formatted = dateFormat.format(today);
String formatted2 =
String.format("%<tH%<tM%<tS%tY%<tm%<td", today);



Recent Comments