Java Timestamp Now getCurrentTimestamp()

Here you can find the source of getCurrentTimestamp()

Description

get Current Timestamp

License

Apache License

Declaration

public static String getCurrentTimestamp() 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.sql.Timestamp;
import java.text.SimpleDateFormat;

public class Main {
    public static String getCurrentTimestamp() {
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Timestamp(System.currentTimeMillis()));
    }/*w  w  w  . ja v  a  2 s  .  c  o  m*/
}

Related

  1. getCurrentSQLTimestamp()
  2. getCurrentSQLTimestamp()
  3. getCurrentTimeStamp()
  4. getCurrentTimeStamp()
  5. getCurrentTimeStamp()
  6. getCurrentTimestamp()
  7. getCurrentTimestamp()
  8. getCurrentTimeStamp()
  9. getCurrentTimestamp()