Java tutorial
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; import java.util.Date; public class Main { private static final String DATE_TIME_FORMAT = "yy-M-d a H:m"; public static String getReadableDateTime(long time) { //todo if it take bad performance or take much more memory,then the android.text.format.DateFormat will be thought. SimpleDateFormat sdf = new SimpleDateFormat(DATE_TIME_FORMAT); return sdf.format(new Date(time)); } }