Java tutorial
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; public class Main { public static String date2String(long time, String format) { SimpleDateFormat sdf = new SimpleDateFormat(format); String s = sdf.format(time); return s; } }