List of utility methods to do Timestamp to Calendar
Calendar | getCalendar(Timestamp timestamp) get Calendar Calendar cal = null; if (timestamp != null) { cal = Calendar.getInstance(); cal.setTimeInMillis(timestamp.getTime()); return cal; |
Calendar | getCalendarFromTimeStamp(Timestamp t) get Calendar From Time Stamp Calendar c = Calendar.getInstance();
c.setTimeInMillis(t.getTime());
return c;
|
String | getCalendarModel(java.sql.Timestamp date) get Calendar Model if (date != null) { return getHours(date.toString()); } else { return null; |
Integer | getCalendarOfTimestamp(java.sql.Timestamp tTimestamp, Locale locale) get Calendar Of Timestamp Calendar cal = Calendar.getInstance(locale); cal.setMinimalDaysInFirstWeek(4); cal.setTime(tTimestamp); return new Integer(cal.get(Calendar.WEEK_OF_YEAR)); |