List of utility methods to do Long Number to Date
String | formatDate(final long timestamp) Formats a timestamp as a human readable date. final Calendar now = Calendar.getInstance(); final Date date = new Date(timestamp); final Calendar cal = Calendar.getInstance(); cal.setTime(date); final SimpleDateFormat dateFormat = getFormatForTimestamp(now, cal); return dateFormat.format(date); |
String | formatDate(long absTime) From input time in nanoseconds, convert to Date format YYYY-MM-dd String sdate = sdateformat.format(new Date((long) (absTime * 1E-6))); return sdate; |
String | formatDate(long d) format Date Calendar calendar = Calendar.getInstance(); calendar.setTimeInMillis(d); SimpleDateFormat date = new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss Z"); return date.format(calendar.getTime()); |
String | formatDate(long d) Convert date to String like "yyyy-MM-dd". return new SimpleDateFormat(DATE_FORMAT).format(d); |
String | formatDate(long date) format Date return formatDate(new Date(date)); |
String | formatDate(long date) Formats and returns a given Date SimpleDateFormat sdf = new SimpleDateFormat(); return sdf.format(new Date(date)); |
String | formatDate(long date) format Date return formatDate(new Date(date), DEFAULT_DATE_PATTERN); |
String | formatDate(long date) Returns a formatted date. The pattern is: yyyy-MM-dd,HH:mm:ss SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd,HH:mm:ss"); Calendar cal = Calendar.getInstance(); cal.setTimeInMillis(date * 1000); return format.format(cal.getTime()); |
String | formatDate(long date) format Date SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); System.out.println(formatter.format(date)); return formatter.format(date); |
String | formatDate(long date) format Date return formatDate(new Date(date), "yyyy-MM-dd HH:mm:ssZ"); |