List of utility methods to do Date Now
String | getCurrentDate(boolean WithDelimeter) get Current Date if (WithDelimeter) return new SimpleDateFormat("yyyy/MM/dd").format(new Date()); return new SimpleDateFormat("yyyyMMdd").format(new Date()); |
Date | getCurrentDate(Date date) get Current Date DateFormat df = new SimpleDateFormat("yyyy-MM-dd"); try { return df.parse(df.format(date)); } catch (ParseException e) { return date; |
String | getCurrentDate(final String form) get Current Date SimpleDateFormat formatter = new SimpleDateFormat(form); java.util.Date currentDate = new java.util.Date(); return formatter.format(currentDate); |
String | getCurrentDate(final String FORMAT) This method returns current date in specific format given try { SimpleDateFormat sdf = new SimpleDateFormat(FORMAT); Calendar c = Calendar.getInstance(); return sdf.format(c.getTime()); } catch (Exception e) { e.printStackTrace(); return ""; ... |
String | getCurrentDate(String format) get Current Date return getDate(0, format);
|
String | getCurrentDate(String format) get Current Date String curDateTime = null; try { SimpleDateFormat mSimpleDateFormat = new SimpleDateFormat(format); Calendar c = new GregorianCalendar(); curDateTime = mSimpleDateFormat.format(c.getTime()); } catch (Exception e) { e.printStackTrace(); return curDateTime; |
String | getCurrentDate(String format) get Current Date SimpleDateFormat sdf = new SimpleDateFormat(format, Locale.SIMPLIFIED_CHINESE); Date date = new Date(); String currentDate = sdf.format(date); return currentDate; |
String | getCurrentDate(String format) get Current Date SimpleDateFormat t = new SimpleDateFormat(format); return t.format(new Date()); |
String | getCurrentDate(String format) get Current Date return new SimpleDateFormat(format).format(new Date()); |
String | getCurrentDate(String format) get Current Date return new SimpleDateFormat(format).format(new Date()); |