List of utility methods to do Timestamp Now
String | currentTimeStamp() current Time Stamp return DateFormat.getDateTimeInstance().format(new Date()); |
Timestamp | currentTimeStamp() Generates the current timestamp. final GregorianCalendar cal = new GregorianCalendar(); final long millis = cal.getTimeInMillis(); return new Timestamp(millis); |
String | currentTimeStamp() Return current date and time in terse format java.text.SimpleDateFormat df = new java.text.SimpleDateFormat("MM/dd/yy HH:mm:ss"); return df.format(new java.util.Date(System.currentTimeMillis())) + " "; |
Timestamp | currentTimestamp() current Timestamp return new Timestamp(currentTimeMillis()); |
String | currentTimestamp() current Timestamp Date now = new Date(); return INTERNATE_DATE_FORMAT.format(now); |
Timestamp | currentTimestamp() current Timestamp return new Timestamp(new Date().getTime()); |
String | currentTimestamp2String(String pattern) current Timestamp String return timestamp2String(currentTimestamp(), pattern);
|
Timestamp | currentTimestampPlus(final long seconds) current Timestamp Plus return new Timestamp(System.currentTimeMillis() + seconds * 1000); |
String | generateTimestamp() generate Timestamp SimpleDateFormat dateFormatter = new SimpleDateFormat(AUTH_DATE_FORMAT); dateFormatter.setTimeZone(TimeZone.getTimeZone("UTC")); return dateFormatter.format(new Date()); |
String | generateTimeStamp() generate Time Stamp SimpleDateFormat dateFormat = new SimpleDateFormat("yy-MM-dd-HH-mm-ss"); Date date = new Date(); return dateFormat.format(date); |