Java tutorial
//package com.java2s; import java.util.Calendar; import android.content.Context; import android.text.format.DateUtils; public class Main { public static String getTimeLable(Context context, Calendar calendar) { return DateUtils.formatDateTime(context, calendar.getTimeInMillis(), DateUtils.FORMAT_SHOW_TIME); } }