List of utility methods to do Date String Format
String | formatShort(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; |
String | formatShow(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; |
String | formatTweetDate1(String date) Convert a given date according to a format used by Twitter to String. return date.substring(0, 10) + ' ' + date.substring(11, 19); |