Java Time Format getFormatTime(Date date)

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

Description

get Format Time

License

Open Source License

Declaration

public static String getFormatTime(Date date) 

Method Source Code

//package com.java2s;

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {

    public static String getFormatTime(Date date) {
        return getFormatDateTime(date, "yyyy-MM-dd HH:mm:ss");
    }/*from w w w.ja v a 2 s.c  om*/

    public static String getFormatDateTime(Date date, String format) {
        SimpleDateFormat sdf = new SimpleDateFormat(format);
        return sdf.format(date);
    }
}

Related

  1. getFormattedTime(Date date)
  2. getFormattedTime(final Calendar calendar)
  3. getFormattedTime(final Date date)
  4. getFormattedTimeFilesafe(long t)
  5. getFormattedTimeString(double s)
  6. getFormatTime(String format)
  7. getFormatTimeString(Date date, String pattern)
  8. getFullDateTimeFormat()
  9. getFullTime(String format, Date date)