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

SimpleDateFormatformatterFor(final Thread t)
formatter For
final SimpleDateFormat tmp = formatters.get(t);
if (tmp != null) {
    return tmp;
final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("'D:'yyyyMMddHHmmssZ");
formatters.put(t, DATE_FORMAT);
return DATE_FORMAT;
StringformatTime(Date d)
format Time
return tf.format(d);
StringformatTime(Date d)
format Time
if (d == null)
    return null;
SimpleDateFormat df = new SimpleDateFormat(TIME_FORMAT);
return df.format(d);
StringformatTime(Date date)
format Time
return formatDate(date, "yyyy-MM-dd HH:mm:ss");
StringformatTime(Date date)
format Time
if (date == null) {
    return NOT_DEFINED_DATE;
return timeDF.format(date.getTime());
StringformatTime(Date date)
format Time
return formatTime(null, date);
StringformatTime(Date date)
Formats the time as hh:mm a
SimpleDateFormat timeFormat = new SimpleDateFormat(TIME_FORMAT_STR);
return timeFormat.format(date);
StringformatTime(Date date)
Formats the given date in the format of "hh:mm:ss.SSSS".
if (date != null) {
    return (new SimpleDateFormat("hh:mm:ss.SSSS")).format(date);
return null;
StringformatTime(Date date)
format Time
String dateString = date.toString();
SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMddHHmm");
try {
    dateString = formatter.format(date);
} catch (IllegalArgumentException iae) {
    iae.printStackTrace();
return dateString;
...
StringformatTime(Date time)
format Time
return DATE_FORMAT.format(time);