List of utility methods to do Date to Long
long | dateToLong(Date date) Convert the date to a Long value. return date.getTime();
|
Long | dateToNumber(Date date) date To Number if (date == null) { return null; Calendar c = Calendar.getInstance(); c.setTime(date); String month; String day; if ((c.get(Calendar.MONTH) + 1) >= 10) { ... |
String | formatDateLong(Date date, Locale locale) Formats the specified date using the DateFormat#LONG format and the specified locale. return DateFormat.getDateInstance(DateFormat.LONG, locale).format(date);
|
Long | formatDateToLong(Date date, String format) format Date To Long if (date == null) { return null; return Long.valueOf(new SimpleDateFormat(format).format(date)); |
long | formatDateToLong(String strDate, String formatstr) format Date To Long if (strDate == null || "".equals(strDate.trim()) || "0".equals(strDate)) { return 0; try { SimpleDateFormat sfarmat = new SimpleDateFormat(formatstr); Date date = sfarmat.parse(strDate); return date.getTime() / 1000; } catch (Exception e) { ... |