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

Stringformat(long date)
format
return format(new Date(date), FORMAT_FULL_GENERIC);
Stringformat(Long date, String pattern)
format
try {
    Date d = DB_FORMAT.parse(String.valueOf(date));
    return format(d, pattern);
} catch (ParseException e) {
    return "";
Stringformat(long date, String pattern)
Format a date/time into a specific pattern.
return format(new Date(date), pattern);
Stringformat(long dateInMillis, String pattern)
format
return new SimpleDateFormat(pattern).format(new Date(dateInMillis));
Stringformat(Long dateMs, String type)
format
Date date = new Date(dateMs);
SimpleDateFormat sdf = new SimpleDateFormat(type);
return sdf.format(date);
Stringformat(Long dateTmie, String formate)
format
Date date = new Date(dateTmie);
return getFormat(formate).format(date);
Stringformat(long time, SimpleDateFormat format)
format
if (format == null) {
    return formatDateTime(time);
Calendar calendar = getCalendar(time);
return format.format(calendar.getTime());
StringformatDate(final long date)
Formats a timestamp representing the seconds since January 1, 1970, 00:00:00 GMT into a string.
return formatDate(new Date(date * 1000));
StringformatDate(final long ticks, final SimpleDateFormat format)
format Date
return format.format(ticksToDate(ticks));
StringformatDate(final long time)
format Date
return new SimpleDateFormat(H_DATE_FROMAT).format(new Date(time));