Here you can find the source of longToDateString(long l)
public static String longToDateString(long l)
//package com.java2s; //License from project: Open Source License import java.util.Date; import java.text.SimpleDateFormat; import java.util.Calendar; public class Main { public static String longToDateString(long l) { Calendar c = Calendar.getInstance(); c.setTimeInMillis(l);// www . j a v a 2 s. com Date d = (Date) c.getTime(); SimpleDateFormat format = new SimpleDateFormat("MMM-dd-yyyy"); String time = format.format(d); return time; } }