Java Timestamp Create toTimestamp(java.sql.Date date)

Here you can find the source of toTimestamp(java.sql.Date date)

Description

to Timestamp

License

Open Source License

Declaration

public static Timestamp toTimestamp(java.sql.Date date) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.sql.Timestamp;

public class Main {
    public static Timestamp toTimestamp(java.sql.Date date) {
        if (date == null) {
            return null;
        }/*  w  ww  . j a v  a2 s.c  om*/

        return new Timestamp(date.getTime());
    }
}

Related

  1. toTimestamp(final Calendar cal)
  2. toTimestamp(final Instant instant)
  3. toTimestamp(final int year, final int month, final int dayOfMonth, final int hour, final int minute, final int second, final int millsecond)
  4. toTimestamp(final java.sql.Date date)
  5. toTimestamp(final String pValue)
  6. toTimestamp(long ts)
  7. toTimestamp(long value)
  8. toTimestamp(Object dateobj)
  9. toTimestamp(Object objInParam)