Here you can find the source of formatDateToHMSString(java.util.Date date)
public static String formatDateToHMSString(java.util.Date date)
//package com.java2s; public class Main { public static String formatDateToHMSString(java.util.Date date) { if (date == null) { return ""; }/*from w w w. j a v a2 s . co m*/ java.text.SimpleDateFormat dateFormat = new java.text.SimpleDateFormat("HH:mm:ss"); return dateFormat.format(date); } }