Here you can find the source of getCalendarModel(java.sql.Timestamp date)
public static String getCalendarModel(java.sql.Timestamp date)
//package com.java2s; //License from project: Apache License public class Main { public static String getCalendarModel(java.sql.Timestamp date) { if (date != null) { return getHours(date.toString()); } else {//w w w . j av a 2s.c om return null; } } public static String getHours(String str) { if (str != null) { String tmpStr = str.trim(); int pos = tmpStr.lastIndexOf(":"); str = str.substring(pos - 5, pos); return str; } else { return null; } } }