I need to convert a resultSet of the database that returns Timestamp to a variable of type Calendar.
resultSet
Timestamp
You can Calendar inform the time , which receives an instance of Date .
Calendar
Date
How Timestamp is subclass of Date , you can do something like this:
public static Calendar timestampToCalendar(final Timestamp timestamp) { final Calendar cal = Calendar.getInstance(); cal.setTime(timestamp); return cal; }