Java Utililty Methods Time Now

List of utility methods to do Time Now

Description

The list of methods to do Time Now are organized into topic(s).

Method

StringgetnowTime()
getnow Time
SimpleDateFormat df = new SimpleDateFormat(SHORT_TIME_FORMAT);
String nowtime = df.format(Calendar.getInstance().getTime());
return nowtime;
StringgetNowTime()
get Now Time
GregorianCalendar gcNow = new GregorianCalendar();
Date dNow = gcNow.getTime();
DateFormat df = DateFormat.getTimeInstance(DateFormat.MEDIUM, Locale.SIMPLIFIED_CHINESE);
return df.format(dNow);
StringgetNowTime()
get Now Time
Date now = new Date();
return DateFormat.getDateTimeInstance().format(now);
StringgetNowTime()
get Now Time
SimpleDateFormat df = new SimpleDateFormat(DATE_FULL_STR);
return df.format(new Date());
StringgetNowTime()
get Now Time
SimpleDateFormat dateFormat = new SimpleDateFormat("a hh:mm:ss ", Locale.CHINA);
dateFormat.setCalendar(nowCalendar);
return dateFormat.format(nowCalendar.getTime());
StringgetNowTime()
get Now Time
return format(new Date(), "yyyy-MM-dd HH:mm:ss");
StringgetNowTime()
return current time value in format: yyyy-MM-dd HH:mm:ss:sss
return dateToStringWithPattern(new Date(), "yyyy-MM-dd HH:mm:ss:sss");
StringgetNowTime()
get Now Time
Date date = new Date();
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd kk:mm:ss");
String time = simpleDateFormat.format(date);
return time;
StringgetNowTime()
get Now Time
java.util.Date v_Date = new java.util.Date(System.currentTimeMillis());
return SDF_FULL.format(v_Date);
StringgetNowTime()
get Now Time
Date date = Calendar.getInstance().getTime();
String sDate = convDateToString(date, "yyyy-MM-dd HH:mm:ss");
return sDate;