public static String getShortDateString ( long time , String format ) { if ( format == null || format . isEmpty ( ) ) { format = "yyyy-MM-dd" ; } SimpleDateFormat smpf = new SimpleDateFormat ( format ) ; return smpf . format ( new Date ( time ) ) ; }
get formated date String