Java Time to String timeToString(final Date date)

Here you can find the source of timeToString(final Date date)

Description

Time to string.

License

Open Source License

Parameter

Parameter Description
date the date
timeZone the time zone

Return

the string

Declaration

public static String timeToString(final Date date) 

Method Source Code


//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;
    }
}

Related

  1. timeToString(Calendar date)
  2. timeToString(Date d, String tzString)
  3. timeToString(Date date)
  4. timeToString(double d)
  5. timeToString(double time, boolean longNames)
  6. timeToString(final long time)
  7. timeToString(int s)
  8. timeToString(int time)
  9. timeToString(int time)