Java tutorial
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static String getDate(String time, String format) { SimpleDateFormat sdf = new SimpleDateFormat(format); Date date = new Date(Long.parseLong(time)); return sdf.format(date); } }