Java Timestamp Create getTimestamp()

Here you can find the source of getTimestamp()

Description

get Timestamp

License

Open Source License

Declaration

static String getTimestamp() 

Method Source Code


//package com.java2s;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Main {
    static String getTimestamp() {
        return formatTimestamp(new Date());
    }//from  w w w  .  j a  va2  s  .co m

    static String formatTimestamp(Date date) {
        DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        return dateFormat.format(date);
    }
}

Related

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