Java Long Number to Time getTimeStr(long timeLong)

Here you can find the source of getTimeStr(long timeLong)

Description

get Time Str

License

Open Source License

Parameter

Parameter Description
timeLong a parameter

Declaration

public static String getTimeStr(long timeLong) 

Method Source Code

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

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    /**/*from  w w  w .j av a 2 s .  com*/
     *
     * @param timeLong
     * @return
     */
    public static String getTimeStr(long timeLong) {
        Date date = new Date(timeLong);
        String timeStr = new SimpleDateFormat("yyyyMMddHHmmss").format(date);
        return timeStr;
    }
}

Related

  1. getTimeLong()
  2. getTimeOf12(long time)
  3. getTimeOld(long time)
  4. getTimestampDiff(Long old)
  5. getTimeStr(long t)
  6. getTimeString(long nanoTime)
  7. getTimeString(long time)
  8. getTimeTagged(long time, boolean round)
  9. getTimeText(Long oldTime)