Java Timestamp Now getTimeStamp()

Here you can find the source of getTimeStamp()

Description

get Time Stamp

License

Apache License

Declaration

public static Timestamp getTimeStamp() 

Method Source Code


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

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

public class Main {
    public static String TIME_FORMAT = "yyyy-MM-dd HH:mm:ss";

    public static Timestamp getTimeStamp() {
        String d = new SimpleDateFormat(TIME_FORMAT).format(Calendar.getInstance().getTime());
        return Timestamp.valueOf(d);
    }// w w w  .ja va 2s. c om
}

Related

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