List of utility methods to do Date to String
String | DateToStringByformat2(Date date) Date To String Byformat return format2.format(date);
|
String | dateToStringFecha(Date fecha) Convierte un objeto de tipo Date a una hilera de caracteres con formato dd/MM/yyyy SimpleDateFormat formateador = new SimpleDateFormat("dd/MM/yyyy"); return formateador.format(fecha); |
String | dateToStringFormat(Date dt, String format) date To String Format SimpleDateFormat fmt = new SimpleDateFormat(format); String dtStr = ""; if (dt != null) { dtStr = fmt.format(dt).toString(); return dtStr; |
String | dateToStringShort(Date date) date To String Short if (date == null) return ""; return FormatDate(date, "yyyy-MM-dd"); |
String | dateToStringTemporalCoverage(Date date) date To String Temporal Coverage SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); try { return sdf.format(date); } catch (NullPointerException ex) { return ""; |
String | dateToStringVerbose(Date date) date To String Verbose if (date == null) { return null; return dateFormatter(false).format(date); |
String | dateToStringWithFormat(Date dateToString, String dateFormat) date To String With Format if (dateToString != null) { DateFormat simpleDateFormat = new SimpleDateFormat(dateFormat); return simpleDateFormat.format(dateToString); } else { return null; |
String | dateToStringWithPattern(Date date, String pattern) date To String With Pattern try { SimpleDateFormat sdf = new SimpleDateFormat(pattern); return sdf.format(date); } catch (Exception e) { SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); return sdf.format(date); |
String | dateToStringWithPattern(Date date, String pattern) return time value of specified date try { SimpleDateFormat simpleDateFormat = new SimpleDateFormat(pattern); return simpleDateFormat.format(date); } catch (Exception e) { return ""; |
String | dateToStringWithTime(Date date) date To String With Time return dateToString(date, DATETIME_PATTERN);
|