Here you can find the source of timeStampToDate(Timestamp tim)
public static Date timeStampToDate(Timestamp tim)
//package com.java2s; //License from project: Apache License import java.sql.Timestamp; import java.util.Calendar; import java.util.Date; public class Main { public static Date timeStampToDate(Timestamp tim) { return timeStampToCal(tim).getTime(); }//from ww w . j a va2s . c om public static Calendar timeStampToCal(Timestamp tim) { if (tim == null) { return null; } Calendar calendar = Calendar.getInstance(); calendar.setTime(tim); return calendar; } }