Here you can find the source of timestamp2DataTime(long timestamp)
public static String timestamp2DataTime(long timestamp)
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; public class Main { public static String timestamp2DataTime(long timestamp) { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); return sdf.format(Long.valueOf(timestamp)); }/* w w w .j a v a 2 s . c om*/ }