Here you can find the source of timeToString(final Date date)
Parameter | Description |
---|---|
date | the date |
timeZone | the time zone |
public static String timeToString(final Date date)
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; public class Main { /** The Constant TIME. */ private static final SimpleDateFormat TIME = new SimpleDateFormat("HH:mm"); /**//from w ww . j av a2s . c o m * Time to string. * * @param date * the date * @param timeZone * the time zone * @return the string */ public static String timeToString(final Date date) { String result = ""; result = TIME.format(date); return result; } }