List of utility methods to do Date Format
String | formatDate(Date date) format Date SimpleDateFormat sdf = new SimpleDateFormat(datePatter); sdf.setTimeZone(TimeZone.getTimeZone(timeZoneCode)); sdf.setLenient(false); return sdf.format(date); |
String | formatDate(Date date) Format the Date object to string with format "yyyy-MM-dd" if (date != null) { synchronized (SDF) { return SDF.format(date); } else { return null; |
String | formatDate(Date date) format Date String dateString = date.toString(); SimpleDateFormat formatter = new SimpleDateFormat("dd-MM-yyyy"); try { dateString = formatter.format(date); } catch (IllegalArgumentException iae) { iae.printStackTrace(); return dateString; ... |
String | formatDate(Date date) format Date return formatDate(date, localDateFormat);
|
String | formatDate(Date date) format Date SimpleDateFormat sd = new SimpleDateFormat("EEE', 'dd' 'MMM' 'yyyy' 'HH:mm:ss' 'zzz", Locale.US); sd.setTimeZone(TimeZone.getTimeZone("GMT")); return sd.format(new Date()); |
String | formatDate(Date date) Convenience method for converting Date to a string representation with minimal overhead. return date == null ? "" : DATE_FORMAT.get().format(date); |
String | formatDate(Date date) format Date SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy"); if (date != null) { return sdf.format(date); return ""; |
String | formatDate(Date date) format Date return formatDate(date, DATE_FORMAT);
|
String | formatDate(Date date) Format a Date to contain both date and time information with full millisecond precision. return createDateFormat().format(date);
|
boolean | formatDate(Date date) format Date boolean isValid = false; String formatDate = null; try { if (date != null) { SimpleDateFormat df = new SimpleDateFormat("MM/dd/yyyy"); formatDate = df.format(date); isValid = isValidDate(formatDate); } catch (Exception e) { isValid = false; return isValid; |