Java examples for java.util:Date Format
get Pretty Date Time
//package com.java2s; import java.text.DateFormat; import java.util.Calendar; public class Main { public static void main(String[] argv) throws Exception { Calendar date = Calendar.getInstance(); System.out.println(getPrettyDateTime(date)); }// w w w . jav a2 s. c o m public static String getPrettyDateTime(Calendar date) { DateFormat dateTimeFormat = DateFormat.getDateTimeInstance( DateFormat.LONG, DateFormat.SHORT); return dateTimeFormat.format(date.getTime()); } }