List of utility methods to do Date to String
String | dateToString(Date pDate, String pFormat) Format a date in string using pFormat. SimpleDateFormat dateFormat = new SimpleDateFormat(pFormat); return dateFormat.format(pDate); |
String | dateToString(Date pdttValue, String pstrDateFormat) Date convert to String. String pstrDate = null; if (pdttValue == null || "".equals(pdttValue)) { return null; String formatStyle = null; if ((pstrDateFormat == null) || (pstrDateFormat.equals(""))) { formatStyle = DATE_FORMAT; } else { ... |
String | DateToString(Date thisdate, Locale locale) Date To String if (thisdate != null) { SimpleDateFormat sdf = (SimpleDateFormat) SimpleDateFormat.getDateInstance(); sdf.applyPattern("dd-MM-yyyy"); return sdf.format(thisdate); } else { return ""; |
String | dateToString(final Date date) Transformiert java.util.Date in ein HL7 String if (date == null) { return null; Calendar cal = new GregorianCalendar(); cal.setTime(date); String pattern = DTM_DATE_TIME_PATTERN; if (cal.get(Calendar.SECOND) == 0) { pattern.substring(0, pattern.length() - 2); ... |
String | dateToString(final Date value, final boolean utc) Converts a date to an ISO8601 string. String result = null; if (utc) { result = ISO_UTC_LOCAL.get().format(value); } else { result = ISO_LOCAL.get().format(value); return result; |
String | dateToString(java.util.Date currdate, String strFormat) date To String String returnDate = ""; try { SimpleDateFormat sdf = new SimpleDateFormat(strFormat); if (currdate == null) return returnDate; else returnDate = sdf.format(currdate); } catch (NullPointerException e) { ... |
Date | dateToString(String date, String format) date To String if (notEmpty(date)) { SimpleDateFormat sdf = new SimpleDateFormat(format); try { return sdf.parse(date); } catch (ParseException e) { e.printStackTrace(); return new Date(); ... |
String | dateToString(String str, DateTimeFormatter dateTimeFormatter) date To String DateTime dt = dateTimeFormatter.parseDateTime(str);
return dt.toString(fmt);
|
String | dateToString1(Date date, String formatIn) date To String String format = formatIn; if (date == null) { return ""; if (format == null) { format = patternD; java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat(format); ... |
String | dateToString_yyyyMMddHHmmssSSS(Date date) date To Strinyyyy M Mdd H Hmmss SSS if (date == null) { return null; return formatDateTime(date, DATETIME_PATTERN_LONG2); |