Java Utililty Methods Timestamp Create

List of utility methods to do Timestamp Create

Description

The list of methods to do Timestamp Create are organized into topic(s).

Method

StringcreateTimeStamps()
Creates TimeStamp For Logging.
java.util.Date today = new java.util.Date();
SimpleDateFormat date1 = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss.SSS");
return (date1.format(today));
StringgetTimestamp()
get Timestamp
return getDate("yyyy-MM-dd HH:mm:ss");
StringgetTimestamp()
get Timestamp
TimeZone timeZone = TimeZone.getTimeZone("UTC");
DateFormat dateFormat = new SimpleDateFormat(ISO8601);
dateFormat.setTimeZone(timeZone);
return dateFormat.format(new Date());
StringgetTimestamp()
get Timestamp
return formatTimestamp(new Date());
StringgetTimeStamp()
get Time Stamp
Date timeStamp = new Date();
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd_a_hhmmss");
return dateFormat.format(timeStamp);
StringgetTimestamp()
get Timestamp
synchronized (D16) {
    return D16.format(new Date());
StringgetTimestamp()
get Timestamp
final Date date = new Date();
final String ISO_FORMAT = "yyyy-MM-dd'T'HH:mm:ssz";
final SimpleDateFormat sdf = new SimpleDateFormat(ISO_FORMAT);
final TimeZone utc = TimeZone.getTimeZone("UTC");
sdf.setTimeZone(utc);
String timeStamp = sdf.format(date);
return timeStamp.replace("UTC", "Z");
StringgetTimeStamp()
Gets the current hour, minute, second and whether it is AM or PM
DateFormat dateFormat = new SimpleDateFormat("h:mm:ss a");
Date date = new Date();
String timeStamp = "[" + dateFormat.format(date) + "]";
return timeStamp;
StringgetTimeStamp()
get Time Stamp
return formatDateTime(DEFAULT_TIME_STAMP_FROMAT, new Date());
StringgetTimestamp()
get Timestamp
String timestamp = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS").format(new Date());
return timestamp;