Here you can find the source of convertMillisecondToDateTimeString(long millisecond, String mark)
Parameter | Description |
---|---|
millisecond | a parameter |
mark | a parameter |
public static String convertMillisecondToDateTimeString(long millisecond, String mark)
//package com.java2s; //License from project: Open Source License import java.text.SimpleDateFormat; import java.util.Date; public class Main { /**// w w w .j a v a 2 s . c om * Description :Convert millisecond to dateTime. * * @param millisecond * @param mark * @return */ public static String convertMillisecondToDateTimeString(long millisecond, String mark) { Date _date = new Date(millisecond); return getDateTime(mark, _date); } public static String getDateTime(String aMask, Date aDate) { String returnValue = ""; if (aDate != null) { SimpleDateFormat df = new SimpleDateFormat(aMask); returnValue = df.format(aDate); } return (returnValue); } }