Java Time Format getShowTime(Date date, String format)

Here you can find the source of getShowTime(Date date, String format)

Description

get Show Time

License

Apache License

Declaration

public static String getShowTime(Date date, String format) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.text.SimpleDateFormat;
import java.util.Date;

public class Main {
    public static String getShowTime(Date date, String format) {
        SimpleDateFormat df = new SimpleDateFormat(format);
        if (date == null) {
            return "";
        } else {//  w w  w.j a  v  a  2  s  .c  om
            return df.format(date);
        }
    }
}

Related

  1. getFormatTimeString(Date date, String pattern)
  2. getFullDateTimeFormat()
  3. getFullTime(String format, Date date)
  4. getGenerationTime(String format)
  5. getIntegerDateTime(Date date, String dateFormat)
  6. getStartTimeFormatter()
  7. getStrDateByFormat(Date time, String format)
  8. getStrDateTime()
  9. getStringFormatFromDateTime(long pDateTime, String format)