Here you can find the source of getTimeStr(long timeLong)
Parameter | Description |
---|---|
timeLong | a parameter |
public static String getTimeStr(long timeLong)
//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; } }