Here you can find the source of LongToDateString(long l)
public static String LongToDateString(long l)
//package com.java2s; //License from project: Apache License import java.text.DateFormat; import java.util.Date; public class Main { public static String LongToDateString(long l) { DateFormat mediumDateFormat; Date sDate;//from www .j av a 2s. com try { mediumDateFormat = DateFormat.getDateTimeInstance(); String date = String.valueOf(l); sDate = new Date(Long.parseLong(date)); } catch (Exception ex) { ex.printStackTrace(); return null; } return mediumDateFormat.format(sDate); } }