List of utility methods to do Timestamp Format
String | format(Timestamp tt, String pattern) format if (tt == null) { return null; Date date = new Date(tt.getTime()); return getFormat(pattern).format(date); |
String | formatDate(Timestamp value) format Date return formatDateTime(value, ISO_DATE_FORMAT);
|
String | formatDate(Timestamp value, String defaultFormat) format Date if (value == null) { return ""; String strFormatStyle = StringUtils.isEmpty(defaultFormat) ? ISO_DATE_FORMAT : defaultFormat; SimpleDateFormat objSimpleDateFormat = new SimpleDateFormat( strFormatStyle); return objSimpleDateFormat.format(value); ... |
String | formatDateTime(Timestamp value) format Date Time return formatDateTime(value, ISO_DATETIME_FORMAT);
|
String | formatDateTime(Timestamp value, String defaultFormat) format Date Time if (value == null) { return ""; String strFormatStyle = StringUtils.isEmpty(defaultFormat) ? ISO_DATETIME_FORMAT : defaultFormat; SimpleDateFormat objSimpleDateFormat = new SimpleDateFormat( strFormatStyle); return objSimpleDateFormat.format(value); ... |
String | formatShortDate(Timestamp value) format Short Date return formatDateTime(value, ISO_SHORT_DATE_FORMAT);
|
String | formatShortDate(Timestamp value, String defaultFormat) format Short Date if (value == null) { return ""; String strFormatStyle = StringUtils.isEmpty(defaultFormat) ? ISO_SHORT_DATE_FORMAT : defaultFormat; SimpleDateFormat objSimpleDateFormat = new SimpleDateFormat( strFormatStyle); return objSimpleDateFormat.format(value); ... |
String | timestampToISO8601(Timestamp aTimestamp) timestamp To ISO return timestampToISO8601(new Date(aTimestamp.getTime())); |
String | toSloTime(Timestamp time) to Slo Time if (time == null) return ""; Calendar cal = Calendar.getInstance(); cal.setTimeInMillis(time.getTime()); SimpleDateFormat sdf = new SimpleDateFormat("d.M.yyyy H:mm"); return sdf.format(cal.getTime()); |