List of utility methods to do Long Number to Date
String | minsSecsFromMs(long ms) mins Secs From Ms NumberFormat nf = NumberFormat.getIntegerInstance(); nf.setMinimumIntegerDigits(2); long mins = ms / MS_IN_MIN; long minsRem = ms - (mins * MS_IN_MIN); long secs = minsRem / MS_IN_SEC; return mins + ":" + nf.format(secs); |
String | secToDate(long secs, String format) sec To Date SimpleDateFormat sdf = new SimpleDateFormat(format); return sdf.format(new Date(secs * 1000L)); |
long | toYMDHMSM(long tm) to YMDHMSM return (Long.parseLong((new SimpleDateFormat("yyyyMMddHHmmssSSS")).format(new Date(tm)))); |