Java Utililty Methods Hour Format

List of utility methods to do Hour Format

Description

The list of methods to do Hour Format are organized into topic(s).

Method

Stringformat(Date date)
format
DateFormat fmt = newGMTFormatter();
return fmt.format(date);
Stringformat(Date date)
format
if (date == null) {
    throw new NullPointerException();
sdf = new SimpleDateFormat(DEFAULT_PATTERN);
return sdf.format(date);
Stringformat(Date date)
format
DateFormat dateFormat = new SimpleDateFormat(DATE_FORMAT_GMT, local);
dateFormat.setTimeZone(timeZone);
return (date != null ? dateFormat.format(date) : EMPTY);
Stringformat(Date date)
format
return SDF.get().format(date);
Stringformat(Date date)
Format the date.
DateFormat df = getThreadLocalDateFormat();
return df.format(date);
Stringformat(Date date)
format
if (date == null)
    return null;
return getFormat(ISO_8601_DATE_Z).format(date);
Longformat(Date date)
format
return Long.parseLong(DB_FORMAT.format(date));
Stringformat(Date date)
Formats the specified date using the default date format.
return dateFormat.format(date);
Stringformat(Date date)
format
if (date == null) {
    return "--";
return sdf.format(date);
Stringformat(Date date)
Format.
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
return sdf.format(date);