Java Time Format toStringFormatTime(long time, String format)

Here you can find the source of toStringFormatTime(long time, String format)

Description

to String Format Time

License

Open Source License

Declaration

public static String toStringFormatTime(long time, String format) 

Method Source Code

//package com.java2s;

import java.text.*;

public class Main {
    public static String toStringFormatTime(long time, String format) {

        SimpleDateFormat sdf = new SimpleDateFormat(format);

        return sdf.format(new java.util.Date(time));
    }/*w w  w.  j ava  2s  . c  om*/
}

Related

  1. timeToString(String format, Date date)
  2. toSQLDateTimeFormat(Calendar cal)
  3. toString(Date time, String format)
  4. toString(String format, long time)
  5. toString(String format, long time)
  6. tryToParse(String datetime, SimpleDateFormat format)
  7. validateDatetimeString(String datetimeString, String format)