List of utility methods to do Date Now
String | getCurrentDateFormated() Formats only current time into String .
return new SimpleDateFormat("HH:mm:ss EEE, dd MMM yyyy").format(new Date()); |
long | getCurrentDateInMillis() get Current Date In Millis Calendar calendar = Calendar.getInstance(); calendar.setTime(new Date()); calendar.setTimeZone(TimeZone.getTimeZone("UTC")); calendar.set(Calendar.HOUR_OF_DAY, 0); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.MILLISECOND, 0); return calendar.getTimeInMillis(); ... |
String | getCurrentDateInSqlFormat() get Current Date In Sql Format Date currentDate = new Date(); return dateToSqlFormat(currentDate); |
String | getCurrentDateINYYYY_MM_DD() get Current Date INYYYMDD return convertTimeInMillisecondsToDateInYYY_MM_DD(System.currentTimeMillis());
|
String | getCurrentDateInyyyyMMddFormat() get Current Date Inyyyy M Mdd Format Date date = new Date(); return convertDateToString(date, DATE_PATTERN_YYYYMMDD); |
String | getCurrentDateINYYYYMMDDHHMMSSwithColons() get Current Date INYYYYMMDDHHMMS Swith Colons DateFormat dateFormat = new SimpleDateFormat("yyyy:MM:dd HH:mm:ss"); Date date = new Date(System.currentTimeMillis()); return dateFormat.format(date); |
String | getCurrentDateMMDDYYYY() Gets current date. Date date = new Date(); SimpleDateFormat MM_DD_YYYY_FORMAT = new SimpleDateFormat("MM/dd/yyyy"); String currentDate = MM_DD_YYYY_FORMAT.format(date); return currentDate; |
String | getCurrentDateSlashStr() Gets the current date slash str. return formatSlashDate(new Date()); |
String | getCurrentDateStr() get Current Date Str return dateToString(getCurrentDate());
|
String | getCurrentDateStr() get Current Date Str Date date = new Date(); DateFormat dtf = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM); String str = dtf.format(date); return str; |