Java Date to Timestamp dateToTimestamp(Date date)

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

Description

date To Timestamp

License

Apache License

Parameter

Parameter Description
date a parameter

Return

Timestamp

Declaration

public static Timestamp dateToTimestamp(Date date) 

Method Source Code


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

import java.sql.Timestamp;

import java.util.Date;

public class Main {
    /***// w ww  . ja  va2  s  . co m
     * 
     * @param date
     * @return Timestamp
     */
    public static Timestamp dateToTimestamp(Date date) {
        return new Timestamp(date.getTime());
    }
}

Related

  1. compareDate(String timeStamp1, String timeStamp2)
  2. dateToTimestamp(Date date)
  3. dateToTimestamp(Date date)
  4. dateToTimestamp(Date date)
  5. dateToTimestamp(Date date)
  6. DateToTimestamp(Date time)
  7. dateToTimestamp(java.util.Date d)