Java Timestamp newTimestamp(Date date)

Here you can find the source of newTimestamp(Date date)

Description

new Timestamp

License

Apache License

Declaration

public static Timestamp newTimestamp(Date date) 

Method Source Code

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

import java.sql.Timestamp;

import java.util.Date;

public class Main {

    public static Timestamp newTimestamp(long millis) {
        return new Timestamp(millis);
    }//w ww . j  a  v  a2  s .com

    public static Timestamp newTimestamp() {
        return newTimestamp(System.currentTimeMillis());
    }

    public static Timestamp newTimestamp(Date date) {
        return newTimestamp(date.getTime());
    }
}

Related

  1. maxTime(Timestamp dayTime)
  2. minusHours(Timestamp ts, int hours)
  3. minusOneSecond(Timestamp now)
  4. newDate(Timestamp time)
  5. newTimestamp()
  6. normalizeDateTimeAsTimestamp(Date changedDate, Locale locale)
  7. nowAsTimestamp()
  8. nowUtcTimestamp()
  9. objToTimeStamp(Object obj)