List of utility methods to do Long Number to Time
String | addMinTime(long time, String addMin) add Min Time if (addMin.contains("m")) { addMin = addMin.replace("m", ""); long ad = Long.valueOf(addMin); long i = ad * 60 * 1000; return getDateByLongTime(time + i); |
String | calcTime(final long totalTime) Calculate time from milliseconds return totalTime / 60000 + ":" + timeFormat.format((totalTime % 60000) / 1000); |
String | convertLong2String(Long time, String format) convert Long String SimpleDateFormat formatter = new SimpleDateFormat(format); Date myDate = new Date(time); return formatter.format(myDate); |
String | convertLongDate(long lDate, String format) convert Long Date Date date = new Date(lDate); SimpleDateFormat dateFormat = new SimpleDateFormat(format); return dateFormat.format(date); |
String | convertLongTimeStampToString(long localTimeStamp) convert Long Time Stamp To String Date dateTimeStamp = new Date(localTimeStamp); String tempPattern = "yyyy-MM-dd a hh:mm"; SimpleDateFormat simpleDateFormat = new SimpleDateFormat(tempPattern); String stringTimeStamp = simpleDateFormat.format(dateTimeStamp); return stringTimeStamp; |
String | convertLongTimeToText(Long time) Convert custom field value to text form if (time != null) { time /= 60; return time.toString(); return null; |
String | convertLongToTimestampString(String dateFormat, Long millSec) convert Long To Timestamp String SimpleDateFormat sdf = new SimpleDateFormat(dateFormat); return sdf.format(millSec); |
String | ConvertLongToTimeString(long lastModified) Convert Long To Time String return toISO2616DateFormat(new Date(lastModified)); |
String | convertMillisToHHMMSS(long millis) convert Millis To HHMMSS TimeZone tz = TimeZone.getTimeZone("UTC"); SimpleDateFormat df = new SimpleDateFormat("HH:mm:ss"); df.setTimeZone(tz); return df.format(new Date(millis)); |
String | convertMillsToDateString(long currentTimeMillis) convert Mills To Date String DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Date date = new Date(currentTimeMillis); return formatter.format(date); |