Java tutorial
//package com.java2s; import java.text.DateFormat; import android.text.format.DateUtils; public class Main { public static CharSequence getSameDayTime(Long time) { return DateUtils.formatSameDayTime(time, System.currentTimeMillis(), DateFormat.SHORT, DateFormat.SHORT); } }