List of utility methods to do Time Now
String | getNow() get Now return new SimpleDateFormat(YYYYMMDDHHMMSS_FORMAT).format(new Date()); |
String | getNow(boolean ifdatetime) get Now java.util.Date dd = new java.util.Date(); java.text.SimpleDateFormat df = null; String rtn = ""; if (ifdatetime) { df = new java.text.SimpleDateFormat(STRING_DATE_FORMAT); } else { df = new java.text.SimpleDateFormat(DATE_FORMAT); rtn = df.format(dd); return rtn; |
String | getNow(final String format) get Now SimpleDateFormat sdf = new SimpleDateFormat(format); return sdf.format(new Date()); |
String | getNow(String format) get Now return dateToString(new Date(), format); |
String | getNowAsNICSDate() get Now As NICS Date return getTimeFromMillisAsNICSDate(getNowAsMillis());
|
String | getNowAsString() get Now As String Calendar cal = Calendar.getInstance(); SimpleDateFormat ISO8601Local = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss"); TimeZone timeZone = TimeZone.getDefault(); ISO8601Local.setTimeZone(timeZone); return ISO8601Local.format(cal.getTime()); |
Date | getNowDateTime() get Now Date Time return Calendar.getInstance().getTime();
|
String | getNowDateTime() get Now Date Time SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); return dateFormat.format(new Date()); |
String | getNowDateTime() get Now Date Time return getFormatNowDateTime("yyyy-MM-dd HH:mm:ss"); |
String | getNowDateTime() Gets the now date time. GregorianCalendar gcNow = new GregorianCalendar(); java.util.Date dNow = gcNow.getTime(); DateFormat df = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM, Locale.SIMPLIFIED_CHINESE); return df.format(dNow); |