Java Date to Time getTimeAsString(Date date)

Here you can find the source of getTimeAsString(Date date)

Description

get Time As String

License

Open Source License

Declaration

public static String getTimeAsString(Date date) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.text.DateFormat;

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    private static final DateFormat TIME_FORMAT = new SimpleDateFormat("HH:mm:ss");

    public static String getTimeAsString(Date date) {
        String value = null;/*from ww w . ja  v  a2  s  .  c o  m*/

        if (date != null) {
            value = TIME_FORMAT.format(date);
        }
        return value;
    }
}

Related

  1. getTime(final Date time)
  2. getTime(java.util.Date date)
  3. getTime(java.util.Date date)
  4. getTime(java.util.Date date)
  5. getTimeAsMilliSeconds(Date dateTime)
  6. getTimeAsXsdDateTime(Date d)
  7. getTimeBackInMillis(final int granularity, final int numberToBack, final Date date)
  8. getTimeBoxValue(TimeZone zone, Date date)
  9. getTimeByCustomPattern(Date date, String pattern)