Here you can find the source of getTimestamp(int year, int month, int day, int hour, int min, int second)
public static Timestamp getTimestamp(int year, int month, int day, int hour, int min, int second)
//package com.java2s; import java.sql.Timestamp; import java.util.Calendar; public class Main { public static Timestamp getTimestamp(int year, int month, int day, int hour, int min, int second) { Calendar calendar = Calendar.getInstance(); calendar.set(year, month - 1, day, hour, min, second); return new Timestamp(calendar.getTimeInMillis()); }/*from w w w . j a v a 2 s . c o m*/ }