Java Utililty Methods yyyy

List of utility methods to do yyyy

Description

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

Method

StringformattedDate(final String format, final Date tweetPollDate)
Format date.
SimpleDateFormat formatDate = new SimpleDateFormat("yyyy-MM-dd");
String dateToFormat = formatDate.format(tweetPollDate);
return dateToFormat;
SimpleDateFormatformatter()
formatter
return new SimpleDateFormat(DATE_FORMAT);
StringformatTimeSpan(long time)
Format a timespan given in ms as human readable output (using hours as the maximum time unit)
StringBuilder res = new StringBuilder(10);
long ms = time % 1000;
long s = time / 1000;
long min = 0;
long hr = 0;
if (s > 60) {
    min = s / 60;
    s = s - (min * 60);
...
StringformatToEapoDate(Date date)
format To Eapo Date
try {
    return new SimpleDateFormat(EAPO_DATE_FORMAT).format(date);
} catch (Exception e) {
    return null;
StringformatToSqlDate(final Date date)
format To Sql Date
final DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
final String formattedSqlDate = df.format(date);
return formattedSqlDate;
StringformatToString(String format, long time)
format To String
if (time == 0) {
    return "";
return new SimpleDateFormat(format).format(new Date(time));
StringformatYmd(Date d)
Utility method to format a date in yyyy-MM-dd format
return formatDate(d, "yyyy-MM-dd", "");
StringformatYMD(Date d)
format YMD
return getDateFormat(YMD).format(d);