Here you can find the source of longToDateTime(long timestamp)
public static String longToDateTime(long timestamp)
//package com.java2s; //License from project: Apache License import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static String longToDateTime(long timestamp) { Date date = new Date(timestamp * 1000); DateFormat formatter = new SimpleDateFormat("yyyy.MM.dd HH:mm:ss"); return formatter.format(date); }/* w w w . jav a2s. c o m*/ }