Java Timestamp Create getTimeStamp()

Here you can find the source of getTimeStamp()

Description

get Time Stamp

License

Open Source License

Return

The current timestamp and am/pm marker.

Declaration

public static synchronized String getTimeStamp() 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    /**/*from w w  w .j a  v  a 2 s  .  c om*/
     * @return The current timestamp and am/pm marker.
     */
    public static synchronized String getTimeStamp() {
        Date timeStamp = new Date();
        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd_a_hhmmss");
        return dateFormat.format(timeStamp);
    }
}

Related

  1. createTimestampFormat()
  2. createTimeStamps()
  3. getTimestamp()
  4. getTimestamp()
  5. getTimestamp()
  6. getTimestamp()
  7. getTimestamp()
  8. getTimeStamp()
  9. getTimeStamp()