Here you can find the source of createDateTimestamp(java.util.Date date)
public static java.sql.Timestamp createDateTimestamp(java.util.Date date)
//package com.java2s; public class Main { public static java.sql.Timestamp createDateTimestamp(java.util.Date date) { java.util.Calendar calendar = java.util.Calendar.getInstance(); calendar.setTime(date);//from ww w . j a v a 2 s . co m return new java.sql.Timestamp((calendar.getTime()).getTime()); } }