Java Time Format getTime(Date dt, String format)

Here you can find the source of getTime(Date dt, String format)

Description

get Time

License

Open Source License

Declaration

public static String getTime(Date dt, String format) 

Method Source Code

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

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {

    public static String getTime(Date dt, String format) {
        SimpleDateFormat st = new SimpleDateFormat(format);
        return st.format(dt);
    }/* ww w  . ja v  a 2s  .co m*/
}

Related

  1. getStringFormatFromDateTime(long pDateTime, String format)
  2. getStringFromTime(Date time, String format)
  3. getSysDateTimeForFileName()
  4. getSysTimeYMDHMS2()
  5. getTime(@Nonnull String format, @Nonnull String date, @Nonnull String tz)
  6. getTime(Date time, int format, Locale locale)
  7. getTime(DateFormat df)
  8. getTime(int format)
  9. getTime(long time, int timeFormat)