List of utility methods to do Date Format
String | convertDateToXSDString(Date date) Converts an instance of Date into the canonical lexical representation of an XSD dateTime with the following exceptions: - Dates before 1 CE (i.e.
if (date == null) { return null; StringBuilder lexicalForm; String dateTime = convertDateToString(date, true); int len = dateTime.length() - 1; if (dateTime.indexOf('.', len - 4) != -1) { while (dateTime.charAt(len - 1) == '0') { ... |
String | convertDayToString(Date aDate) convert Day To String return getDateTime(HOMI_TIME_FORMAT, aDate);
|
String | dateFmtToString(Date date, SimpleDateFormat fmt) date Fmt To String return fmt.format(date);
|
String | dateFormat(Date d, String formatStr) date Format return new java.text.SimpleDateFormat(formatStr).format(d); |
String | dateFormat(Date date) date Format if (date == null) { return ""; return getFormat(dateFormat).format(date); |
String | dateFormat(Date date) date Format if (date != null) { DateFormat sf = new SimpleDateFormat("yyyy-MM-dd HH:mm"); return sf.format(date); } else { return ""; |
String | dateFormat(Date date) date Format SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); return sdf.format(date); |
String | dateFormat(Date date) Format a Date object into a string format for a day that meets submission report standard. DateFormat sdf = new SimpleDateFormat("MM/dd/yyyy"); return sdf.format(date); |
Date | dateFormat(Date date) date Format SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); Date value = new Date(); try { value = sdf.parse(sdf.format(date)); } catch (ParseException e) { e.printStackTrace(); return value; ... |
String | dateFormat(Date date, String format) Transforma uma data para uma string no formato especificado. if (date == null) return ""; SimpleDateFormat objDateFormat = new SimpleDateFormat(format); return objDateFormat.format(date); |