Java Time Format timeToString(String format, Date date)

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

Description

time To String

License

Open Source License

Declaration

public static String timeToString(String format, Date date) 

Method Source Code


//package com.java2s;
import java.text.DateFormat;

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {

    public static String timeToString(String format, Date date) {
        DateFormat df = new SimpleDateFormat(format);
        return df.format(date);
    }//from  www  .j av a  2 s.c om
}

Related

  1. time2String(Date time, DateFormat dateFormat)
  2. timeFormatDate(Date d)
  3. timeFormatNano(long delta)
  4. timeFormatter()
  5. timestr(String format, long secs)
  6. toSQLDateTimeFormat(Calendar cal)
  7. toString(Date time, String format)
  8. toString(String format, long time)
  9. toString(String format, long time)