Here you can find the source of newTimestamp(Date date)
public static Timestamp newTimestamp(Date date)
//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()); } }