Get Time From Date
import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class Util{ public static String getTimeFromDate (Date date) throws ParseException { DateFormat formatter = new SimpleDateFormat("HH:mm:ss.SSS"); return formatter.format(date); } }