List of utility methods to do Year Format
DateFormat | formatSlashedMmDdYy() DateFormat for "MM/dd/yy". return new SimpleDateFormat("MM/dd/yy"); |
String | formatTimeStampYearFirst(Date date) format Time Stamp Year First return date == null ? "" : dateTimeFormat2.format(date); |
String | formatUniversalMonthYear(Date date) format Universal Month Year return UNIVERSAL_MONTH_YEAR_FORMAT.format(date);
|
String | formatYear(Date d, Locale locale) format Year SimpleDateFormat sdf = new SimpleDateFormat("yyyy", getSafeLocale(locale)); Calendar c = Calendar.getInstance(getSafeLocale(locale)); c.setTime(d); return sdf.format(d); |
String | formatYear(Date date) Formats a Date object to an ISO8601 year string. if (date == null) { return formatYear(new Date()); String dateStr = m_ISO8601Year.format(date); return dateStr; |
String | formatYear(Date date) format Year return format(date, DEFAULT_YEAR_FORMAT);
|
String | formatYearMonth(Date date) format Year Month try { return yyyyMM.format(date); } catch (Exception ex) { ex.printStackTrace(); return null; |
String | formatYyyyMm(Date date) Formats a date object to "YYYYMM". if (date == null) { return ""; return formatYyyyMm().format(date); |
String | formatyyyyMMddHHmmss(long time) formatyyyy M Mdd H Hmmss return yyyyMMddHHmmss.format(new java.util.Date(time)); |
String | get_Oracle_DateString_YYYYMMdd_HHmmss(java.util.Date date) ge Oracl Date StrinYYYYM MdH Hmmss if (date == null) return "NULL"; String dateString = "'" + YYYYMMdd_HHmmss.format(date) + "'"; return "TO_DATE(" + dateString + ", 'YYYY.MM.DD HH24:MI:SS')"; |