Here you can find the source of formatAsHour(long l)
public static String formatAsHour(long l)
//package com.java2s; //License from project: Open Source License import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; public class Main { private static final DateFormat df2 = new SimpleDateFormat("MM/dd-HH:mm"); private static final DateFormat dfHour = new SimpleDateFormat("HH:mm"); public static String formatAsHour(long l) { return dfHour.format(new Date(l * 60 * 1000)); }// w w w .j a va 2 s.com public static String format(long l) { return df2.format(new Date(l * 60 * 1000)); } }