Java Time Format getFormattedTime(Date date)

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

Description

get Formatted Time

License

Open Source License

Declaration

public static String getFormattedTime(Date date) 

Method Source Code

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

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    private static final String DISPLAYED_FORMATTED_TIME = "HHmm";

    public static String getFormattedTime(Date date) {
        assert date != null;
        SimpleDateFormat formatter = new SimpleDateFormat(DISPLAYED_FORMATTED_TIME);
        String formattedTime = formatter.format(date);
        return formattedTime;
    }/* ww  w.  j a  v a  2  s .  c  o m*/
}

Related

  1. getFormattedDateTime(String date, String dateFormat)
  2. getFormattedDuration(long fromTime)
  3. getFormattedFileTime(File f, String format)
  4. getFormattedTime()
  5. getFormattedTime(Date date)
  6. getFormattedTime(final Calendar calendar)
  7. getFormattedTime(final Date date)
  8. getFormattedTimeFilesafe(long t)
  9. getFormattedTimeString(double s)