List of utility methods to do yyyy
String | formatDateFromStringToString(String str) format Date From String To String SimpleDateFormat sf1 = new SimpleDateFormat("yyyyMMdd"); SimpleDateFormat sf2 = new SimpleDateFormat("yyyy-MM-dd"); try { return sf2.format(sf1.parse(str)); } catch (ParseException e) { return ""; |
String | formatDateNoTime(Date date) Formats a date as (for example) "2/6/2002". return dateFormatter2.format(date);
|
String | formatDateString(java.util.Date date, String format) Convert a date to required String format. if ((date == null) || (format == null)) { return null; SimpleDateFormat fm = new SimpleDateFormat(format); return fm.format(date); |
String | formatDateToString(Date d) formatage d'une date pour ne garder que jour, mois , annee if (d != null) { DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy"); return dateFormat.format(d); } else { return null; |
Date | formatDateToString(String strDate) format Date To String Date date = null; try { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); date = sdf.parse(strDate); } catch (Exception e) { date = new Date(); return date; ... |
String | formatDicomDate(String dicomDate) Format a DICOM date (YYYYMMDD) to a more human readable form. if ((dicomDate == null) || (dicomDate.length() != 8) || (dicomDate.replaceAll("[0-9]", "").length() != 0)) { return dicomDate; Date date = null; try { date = DICOM_DATE_FORMAT.parse(dicomDate); return HUMAN_DATE_FORMAT.format(date); } catch (ParseException e) { ... |
String | formatearDateToString(Date date) Metodo realiza formato dd/MM/yyyy a un objeto Date SimpleDateFormat sdf = new SimpleDateFormat(FECHA_FORMATO); return date != null ? sdf.format(date) : null; |
String | formatFecha(Date fecha) format Fecha SimpleDateFormat sdf = new SimpleDateFormat(PATRON_FECHA); return sdf.format(fecha); |
String | formatFromDate(Date date) format From Date return formatFromDate(FORMATER_YYYY_MM_DD, date);
|
String | formatG(Date date) format G SimpleDateFormat sdf = new SimpleDateFormat(FORMAT_STYLE_G); if (null != date && !"".equals(date)) { return sdf.format(date); return null; |