Java Time Format long2String(long longTime, String dataFormat)

Here you can find the source of long2String(long longTime, String dataFormat)

Description

long String

License

Open Source License

Declaration

public static String long2String(long longTime, String dataFormat) 

Method Source Code

//package com.java2s;

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {

    public static String long2String(long longTime, String dataFormat) {
        Date d = new Date(longTime);
        SimpleDateFormat s = new SimpleDateFormat(dataFormat);
        String str = s.format(d);

        return str;
    }//w  ww .j  a  va 2 s  .  c  o  m
}

Related

  1. getXsdDateTimeFormat()
  2. getXSDFormatter(DateTime date)
  3. isDateFormat(String timeString)
  4. long2Datestr(long time, String format)
  5. long2String(long longTime, String dataFormat)
  6. newDateTimeFormat()
  7. printDate(final long time, final String dateFormat)
  8. printFormatDate(long dateTime)
  9. setDateTimeFormat(String format)