List of utility methods to do Date Format
String | toString(Date value, String format) to String if (value != null) { SimpleDateFormat dateFormat = new SimpleDateFormat(format); dateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); return dateFormat.format(value); } else { return ""; |
String | toStringFR(Date date) to String FR as format "dd/MM/yyyy" return toString(date, DATE_FORMAT_dd_MM_yyyy);
|
String | toStringUS(Date date) to String US as format "MM/dd/yyyy" return toString(date, DATE_FORMAT_MM_dd_yyyy);
|
String | toTimeString(Date value) to Time String if (value != null) { SimpleDateFormat dateFormat = new SimpleDateFormat("HH:mm:ss"); dateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); return dateFormat.format(value); } else { return ""; |
String | format(Date date) Converts a java.util.Date object to a string using the defined default format yyyy-MM-dd HH:mm return DEFAULT_FORMATTER.format(date);
|
String | format(Date date, String pattern) format if (date == null) { return null; return getFormat(pattern).format(date); |
String | formatData(Date date) format Data return DATE_FORMAT.format(date);
|
String | formatDate(final Date date) format Date return DateFormat.format(dateFormatString, date).toString();
|
String | getStringFromDate(Date date, String format) get String From Date SimpleDateFormat formatter = new SimpleDateFormat(format); return formatter.format(date); |
String | getFormatTomorrow(String format) get Format Tomorrow return getFormatCurrentAdd(1, format);
|