Java Timestamp Now getCurrentDateTimestamp()

Here you can find the source of getCurrentDateTimestamp()

Description

get Current Date Timestamp

License

Open Source License

Declaration

public static Timestamp getCurrentDateTimestamp() 

Method Source Code


//package com.java2s;
import java.sql.Timestamp;
import java.text.DateFormat;

import java.text.SimpleDateFormat;

public class Main {

    public static Timestamp getCurrentDateTimestamp() {
        DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Timestamp createDttm = Timestamp.valueOf(df.format(new java.util.Date()));
        return createDttm;
    }//from   w w  w. j  av  a2 s .  com
}

Related

  1. generateTimestamp()
  2. generateTimestamp()
  3. getAfterSecond(Timestamp currentDate)
  4. getCurrentAgeForDate(Timestamp birthDate, Timestamp endDate)
  5. getCurrentDateAsTimestamp()
  6. getCurrentDBTimestamp()
  7. getCurrentSQLTimestamp()
  8. getCurrentSQLTimestamp()
  9. getCurrentTimestamp()