Here you can find the source of date2Timestamp(Date date)
public static Timestamp date2Timestamp(Date date)
//package com.java2s; //License from project: Open Source License import java.sql.Timestamp; import java.util.Date; public class Main { public static Timestamp date2Timestamp(Date date) { if (date == null) { return null; }// www .jav a2s. co m return new Timestamp(date.getTime()); } }