Java Utililty Methods Date String Format

List of utility methods to do Date String Format

Description

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

Method

StringformatShort(String strDate)
format Short
String ret = "";
if (strDate != null && !"1900-01-01 00:00:00.0".equals(strDate) && strDate.indexOf("-") > 0) {
    ret = strDate;
    if (ret.indexOf(" ") > -1)
        ret = ret.substring(0, ret.indexOf(" "));
return ret;
StringformatShow(String queryDate)
format Show
String year = queryDate.substring(0, 4);
year = year + "-";
String month = queryDate.substring(4, 6);
month = month + "-";
String day = queryDate.substring(6, 8);
return year + month + day;
StringformatTweetDate1(String date)

Convert a given date according to a format used by Twitter to String.

return date.substring(0, 10) + ' ' + date.substring(11, 19);