List of utility methods to do Date to Timestamp
String | escapeAsTimestamp(Date date) escape As Timestamp return "{ts '" + tsdf.format(date) + "'}"; |
String | getAsTimestampOrEmptyString(Date date) get As Timestamp Or Empty String return formatDate(TIME_STAMP_DATE_FORMAT, date, ""); |
String | getAuditTimestamp(Date date) get Audit Timestamp String value = null; if (date != null) { value = AUDIT_FORMAT.format(date); return value; |
String | getDetailedTimeStamp(Date date) Returns a time stamp of the format "yy.MM.dd - HH:mm" for the given date. SimpleDateFormat formatter = new SimpleDateFormat("yy.MM.dd - HH:mm:ss:SSS"); return formatter.format(date); |
String | getDisplayableTimeStamp(Date timeStamp) Used for all of the timestamps in caIntegrator2. return timeStamp == null ? TIMESTAMP_UNAVAILABLE_STRING : new SimpleDateFormat(TIMESTAMP_FORMAT, Locale.US).format(timeStamp); |
String | getDisplayTimeStamp(Date date) get Display Time Stamp if (date != null) { SimpleDateFormat formatter = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); String cs = formatter.format(date); return cs; return ""; |
String | getJnlpTimestamp(Date date) get Jnlp Timestamp final SimpleDateFormat dateFormat = new SimpleDateFormat(JNLP_TIMESTAMP_DATETIME_FORMAT); return JNLP_TIMESTAMP_PREFIX + dateFormat.format(date); |
Timestamp | getTimestamp(Date date) get Timestamp return new Timestamp(date.getTime()); |
Timestamp | getTimestamp(Date date) get Timestamp return date == null ? currentTimestamp() : new Timestamp(date.getTime()); |
Timestamp | getTimestamp(Date date) get Timestamp return Timestamp.valueOf(dateStr(date));
|