List of utility methods to do Date Create
String | toDate(final Date date) to Date final SimpleDateFormat sdf = new SimpleDateFormat(DATE_PATTERN); return date != null ? sdf.format(date) : null; |
String | toDate(int date) to Date return new SimpleDateFormat("dd.MM.yyyy").format(new Date(date * 1000L)); |
String | toDate(int flag, Date... date) to Date SimpleDateFormat simple = null; if (flag == 0) simple = new SimpleDateFormat(FORMAT_0); else if (flag == 1) simple = new SimpleDateFormat(FORMAT_1); else simple = new SimpleDateFormat(FORMAT_2); if (date.length > 0) { ... |
String | toDate(long lastModified) to Date SimpleDateFormat sdf = new SimpleDateFormat("MM-dd HH:mm:ss"); return sdf.format(lastModified); |
Date | toDate(long segundos) to Date long horas = segundos / 3600; segundos = segundos % 3600; long minutos = segundos / 60; segundos = segundos % 60; DecimalFormat df = new DecimalFormat("00"); String sfecha = df.format(horas) + ":" + df.format(minutos) + ":" + df.format(segundos); Date fecha = timeToDate(sfecha); return fecha; ... |
String | toDate(long time) Convert friendly date time format return formatDateTime.format(time);
|
Date | toDate(long time) Returns the given long value as a date object. return new Date(time); |
Object | toDate(Object o) to Date SimpleDateFormat sdf = null; try { if (o instanceof Date) { return o; } else if (o instanceof String) { String text = ((String) o).trim(); int len = text.length(); if (len == d_cst_fmt.length()) { ... |
Date | ToDate(Object o) To Date return ToDate(ToString(o));
|
Date | toDate(Object object) to Date String in = object.toString(); Date date; DateFormat formater = new SimpleDateFormat("yyyy-MM-dd"); try { date = formater.parse(in); return date; } catch (ParseException e) { return null; ... |