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