Java tutorial
//package com.java2s; import java.text.SimpleDateFormat; public class Main { public static String convertTime(long time) { String format = "M-d k:mm"; SimpleDateFormat sdf = new SimpleDateFormat(format); return sdf.format(time); } }