Here you can find the source of getHms(Timestamp timestamp)
public static String getHms(Timestamp timestamp)
//package com.java2s; //License from project: Open Source License import java.sql.Timestamp; import java.text.SimpleDateFormat; public class Main { public static String getHms(Timestamp timestamp) { SimpleDateFormat bartDateFormat = new SimpleDateFormat("HH:mm:ss"); String hms = bartDateFormat.format(timestamp); return hms; }/*from ww w . j a v a2 s .c om*/ }