Here you can find the source of longToTimedDate(long time)
Parameter | Description |
---|---|
time | the long value you wish to convent |
public static String longToTimedDate(long time)
//package com.java2s; //License from project: Open Source License import java.text.SimpleDateFormat; public class Main { private static final String DATE_FORMAT_NOW = "yyyy-MM-dd HH:mm:ss"; /**// w w w .ja v a2 s . com * Convent a long value into a date containing a time-stamp * * @param time * the long value you wish to convent * @return the time-stamped date in string form */ public static String longToTimedDate(long time) { SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT_NOW); return sdf.format(Long.valueOf(time)); } }