List of utility methods to do Date to String
String | date2Str(final Date date, final String dateFormat) date Str SimpleDateFormat sdf = new SimpleDateFormat(dateFormat); try { return sdf.format(date); } catch (Exception e) { return null; |
String | date2Str(SimpleDateFormat date_sdf) date Str Date date = getDate(); if (null == date) { return null; return date_sdf.format(date); |
String | date2string(Date _aDate) datestring final String m_dateFormatXAdES = "yyyy-MM-dd'T'HH:mm:ss'Z'"; SimpleDateFormat f = new SimpleDateFormat(m_dateFormatXAdES); f.setTimeZone(TimeZone.getTimeZone("GMT+00:00")); String dateStr = f.format(_aDate); return dateStr; |
String | date2string(Date date) datestring SimpleDateFormat df = new SimpleDateFormat("EEE MMM dd HH:mm:ss Z yyyy", Locale.ENGLISH); String sendtime = df.format(date); return sendtime; |
String | date2string(Date date) datestring return date2string(date, "yyyy-MM-dd HH:mm:ss"); |
String | date2String(Date date) date String SimpleDateFormat formatter = new SimpleDateFormat(DEFAULT_DATE_PATTERN); formatter.setTimeZone(TimeZone.getDefault()); return formatter.format(date); |
String | date2String(Date date) date String return date2String(date, "yyyy-MM-dd HH:mm"); |
String | date2String(Date date) This method convert date to format string if (date == null) { return ""; return SDFDATE.format(date); |
String | date2String(Date date) date String return date2String(date, "-"); |
String | date2String(Date date) date String return date2String(date, "yyyy-MM-dd HH:mm:ss.SSS"); |