Android examples for java.util:Date Convert
Format long value Date To String in MM/dd/yy h:mmaa format
import android.text.format.DateFormat; import java.util.Calendar; public class Main{ public static CharSequence DateToString(long time) { return DateFormat.format("MM/dd/yy h:mmaa", time); }/*from ww w . ja va 2 s . c om*/ }