Here you can find the source of getDateByLongTime(long time)
public static String getDateByLongTime(long time)
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; import java.util.*; public class Main { public static String getDateByLongTime(long time) { SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss"); Date dt = new Date(time); String timeStr = sdf.format(dt); return timeStr; }//from ww w . j a v a 2 s . c o m }