Here you can find the source of toTimeString(Date date)
public static String toTimeString(Date date)
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static final String Format_Time = "HH:mm:ss"; public static String toTimeString(Date date) { if (date == null) { return ""; }//from ww w. ja v a 2 s. com return new SimpleDateFormat(Format_Time).format(date); } }