Here you can find the source of getCalendar(Timestamp timestamp)
public static Calendar getCalendar(Timestamp timestamp)
//package com.java2s; //License from project: Open Source License import java.sql.Timestamp; import java.util.Calendar; public class Main { public static Calendar getCalendar(Timestamp timestamp) { Calendar cal = null;/*w w w. j ava 2 s. c o m*/ if (timestamp != null) { cal = Calendar.getInstance(); cal.setTimeInMillis(timestamp.getTime()); } return cal; } }