Here you can find the source of timestampToFormattedDate(Long timestamp)
public static String timestampToFormattedDate(Long timestamp)
//package com.java2s; //License from project: Open Source License import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("dd.MM.yyyy HH:mm"); public static String timestampToFormattedDate(Long timestamp) { if (timestamp == null) { return null; }//from w w w . j av a2 s. c om return DATE_FORMAT.format(new Date(timestamp)); } }