Java Utililty Methods Long Number to Date

List of utility methods to do Long Number to Date

Description

The list of methods to do Long Number to Date are organized into topic(s).

Method

StringformatDateHeader(final long date)
format Date Header
return new SimpleDateFormat(DATE_HEADER_FMT).format(new Date(date));
StringformatDateHeader(long millis)
format Date Header
return RFC822_FORMAT_PATTERN.format(millis);
StringformatDateHeader(long value)
format Date Header
SimpleDateFormat format = new SimpleDateFormat(HTTP_RESPONSE_DATE_HEADER, Locale.US);
format.setTimeZone(GMT);
return format.format(new Date(value));
StringformatDateISO(long millis)
format Date ISO
Date d = new Date();
d.setTime(millis);
return formatDateISO(d);
StringformatDateTime(long d)
Convert date and time to string like "yyyy-MM-dd HH:mm".
return new SimpleDateFormat(DATETIME_FORMAT).format(d);
StringformatDateTime(long d)
Convert date and time to string like "yyyy-MM-dd HH:mm".
return new SimpleDateFormat(DATETIME_FORMAT).format(d);
StringformatDateTime(long date)
format Date Time
return formatDate(new Date(date), DEFAULT_DATETIME_PATTERN);
StringformatDateTime(long millis)
format Date Time
Date resultdate = new Date(millis);
return datetime.format(resultdate);
StringformatDateTime(long time)
format Date Time
SimpleDateFormat format = getTimeFormat();
Calendar calendar = getCalendar(time);
return format.format(calendar.getTime());
StringformatDateTime(long timestampEpoch)
format Date Time
synchronized (dtg) {
    return dtg.format(new Date(timestampEpoch));