Java Long Number to Date convertDateFromTimeStamp(long timeStamp, String dateFormat)

Here you can find the source of convertDateFromTimeStamp(long timeStamp, String dateFormat)

Description

convert Date From Time Stamp

License

Open Source License

Declaration

public static String convertDateFromTimeStamp(long timeStamp, String dateFormat) 

Method Source Code


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

import java.text.DateFormat;

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

public class Main {
    public static String convertDateFromTimeStamp(long timeStamp, String dateFormat) {
        Date date = new Date(timeStamp);
        DateFormat format = new SimpleDateFormat(dateFormat);
        return format.format(date);
    }/*from  w w w .j a va2  s .c  o  m*/
}

Related

  1. convertDate(long datenum)
  2. convertDate(long millisecs)
  3. convertDate(long timestamp)
  4. convertDate(Long uTime, SimpleDateFormat dateFormat)
  5. convertDateFromLong(Long val)
  6. convertDateToString(long value)
  7. convertDecimal(long l)
  8. converteDataStr2Long(String str)
  9. convertFromLongToString(SimpleDateFormat fm, long date)