List of utility methods to do Timestamp Format
String | formatTimestamp(Date timestamp) format Timestamp return yyyyMMddFormatter.get().format(timestamp);
|
String | formatTimestamp(Date timestamp) format Timestamp DateFormat format = new SimpleDateFormat(DATE_TIME_FORMAT); format.setCalendar(new GregorianCalendar(UTC)); return format.format(timestamp); |
String | formatTimestamp(final Date date) format Timestamp return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(date); |
String | formatTimestamp(final Long timestamp) Formats the given timestamp using the following pattern:'yyyy-MM-dd HH:mm:ss'. final SimpleDateFormat dateTimeFormat = new SimpleDateFormat(TSTP); dateTimeFormat.setTimeZone(TimeZone.getDefault()); return timestamp != null ? dateTimeFormat.format(new Date(timestamp * UNIX_TSTP)) : ""; |
String | formatTimeStamp(long epochTime) Return a readable formatted version of the given epoch time. return TIME_FORMAT.format(new Date(epochTime)); |
String | formatTimestamp(Long mills) format Timestamp return formatTimestamp(new Date(mills)); |
String | formatTimestamp(long timestamp) format Timestamp Date date = new Date(timestamp); String formatString = "dd.MM.YY HH:mm:ss.S"; SimpleDateFormat formatter = new SimpleDateFormat(formatString); return formatter.format(date); |
String | formatTimestamp(long timestamp) format Timestamp if (timestamp <= 0) return null; SimpleDateFormat sdf = new SimpleDateFormat("HH:mm"); return (sdf.format(new Date(timestamp))); |
String | formatTimestamp(long timestamp) format Timestamp SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX"); return sdf.format(new Date(timestamp)); |
String | formatTimestamp(long timestamp) format Timestamp DateFormat dtf = new SimpleDateFormat("HH:mm:ss"); dtf.setTimeZone(TimeZone.getDefault()); return dtf.format(new Date(timestamp)); |