Java Utililty Methods Time to String

List of utility methods to do Time to String

Description

The list of methods to do Time to String are organized into topic(s).

Method

StringtimeToString(long time)
time To String
double timeSec = time / 1000.0;
double timeMin = timeSec / 60.0;
return "" + time + " ms, " + _doubleFormatter.format(timeSec) + " sec, " + _doubleFormatter.format(timeMin)
        + " min";
StringtoString(Calendar modifiedTime, String pattern)
to String
SimpleDateFormat formatter = new SimpleDateFormat(pattern);
formatter.setTimeZone(IST);
return formatter.format(modifiedTime.getTime());
StringtoString(Date d, boolean includeTime)
to String
if (d != null) {
    return new SimpleDateFormat(includeTime ? DATETIME_PATTERN : DATE_PATTERN).format(d);
return null;
StringtoString(Date time)
to String
return getDateString(time, "yyyy-MM-dd HH:mm:ss");
StringtoString(long time)
to String
return toIsoString(time);