Here you can find the source of formatDate(long p_millis)
Parameter | Description |
---|---|
p_millis | The epoch date/time |
public static String formatDate(long p_millis)
//package com.java2s; //License from project: Open Source License import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; public class Main { /**/*from ww w. jav a2 s . co m*/ * Formats an epoch date in a standard way: MM/dd/yyyy * @param p_millis The epoch date/time * @return The formatted string */ public static String formatDate(long p_millis) { Date date = new Date(p_millis); DateFormat formatter = new SimpleDateFormat("MM/dd/yyyy"); return formatter.format(date); } }