Java tutorial
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Calendar; public class Main { public static String parseTime(String date) { Calendar c = Calendar.getInstance(); c.setTimeInMillis(Long.parseLong(date)); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); return sdf.format(c.getTime()); } }