List of utility methods to do Date Now
String | getCurrentDateAndTime() get Current Date And Time return getFormattedDateAndTime(new Date()); |
String | getCurrentDateAndTimeFormat() get Current Date And Time Format SimpleDateFormat myFormatter = new SimpleDateFormat("yyyy-MM-dd hh:mm z"); Date currentDate = new Date(System.currentTimeMillis()); String myFormattedDate = myFormatter.format(currentDate); return myFormattedDate; |
String | getCurrentDateAsNiceString() get Current Date As Nice String SimpleDateFormat formatter = new SimpleDateFormat("dd-MMM-yy"); Date now = new Date(); return formatter.format(now); |
byte[] | getCurrentDateAsNumericEncodedByteArray() get Current Date As Numeric Encoded Byte Array SimpleDateFormat format = new SimpleDateFormat("yyMMdd"); return fromHexString(format.format(new Date())); |
String | getCurrentDateAsString() get Current Date As String return DEFAULT_DATE_FORMAT.format(Calendar.getInstance().getTime());
|
String | getCurrentDateAsString(DateFormat df) get Current Date As String return df.format(new Date()); |
String | getCurrentDateAsString(String timestampFormat) Get the current date timestamp as a string Format formatter; Date date = new Date(); formatter = new SimpleDateFormat(timestampFormat); return formatter.format(date).toString(); |
String | getCurrentDateByString(String datePattern) get Current Date By String return new SimpleDateFormat(datePattern).format(System.currentTimeMillis()); |
String | getCurrentDateDBFormat() get Current Date DB Format Date current = new Date(System.currentTimeMillis()); return dateFormatDB.format(current); |
String | getCurrentDateFormat() get current date return formatDate(new Date()); |