Here you can find the source of getCalendarTimestamp(Calendar cal)
public static Timestamp getCalendarTimestamp(Calendar cal)
//package com.java2s; //License from project: Apache License import java.sql.Timestamp; import java.util.Calendar; public class Main { public static Timestamp getCalendarTimestamp(Calendar cal) { return new Timestamp(cal.getTime().getTime()); }//from w w w. j a v a 2s . c o m }