Here you can find the source of parseLongToString(long millsSeconds)
public static String parseLongToString(long millsSeconds)
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static final String yyyyMMddHH = "yyyyMMddHH"; public static String parseLongToString(long millsSeconds) { SimpleDateFormat df = new SimpleDateFormat(yyyyMMddHH); Date date = new Date(millsSeconds); return df.format(date); }/* w w w . java 2s .com*/ public static String parseLongToString(long millsSeconds, String format) { SimpleDateFormat df = new SimpleDateFormat(format); Date date = new Date(millsSeconds); return df.format(date); } }