List of utility methods to do SQL Date From
Timestamp | getCurrentTime() get Current Time Calendar calendar = Calendar.getInstance(); java.util.Date now = calendar.getTime(); Timestamp currentTimestamp = new Timestamp(now.getTime()); return currentTimestamp; |
Timestamp | getCurrentTime() get Current Time long time = Calendar.getInstance(Locale.CANADA).getTime().getTime(); return new Timestamp(time); |
String | getCurrentTime() get Current Time return getDateString(DATETIME_FORMAT);
|
String | getCurrentTime(String format) get Current Time Calendar calendar = Calendar.getInstance(); SimpleDateFormat formats = new SimpleDateFormat(format); String time = formats.format(calendar.getTime()); return time; |
long | getCurrentTimeMillis() get Current Time Millis Timestamp time = getSysDate();
return time.getTime();
|
String | GetCurrFormattedDateTime(String strFormatTo) Get Curr Formatted Date Time java.sql.Timestamp date = new java.sql.Timestamp(System.currentTimeMillis()); SimpleDateFormat formatter = new SimpleDateFormat(strFormatTo); return formatter.format(date); |
String | getCurrTime() get Curr Time Date currdate = getTodayDate(); java.sql.Time tt = new java.sql.Time(currdate.getTime()); return tt.toString(); |
Timestamp | getCurTime() get current time return new Timestamp(Calendar.getInstance().getTime().getTime()); |
LocalTime | getDatabaseLocalTime(Time databaseDate) get Database Local Time if (databaseDate != null) { return databaseDate.toLocalTime(); } else { return null; |
Timestamp | getDateTime() get Date Time return Timestamp.valueOf(getFormatDate("yyyy-MM-dd HH:mm:ss")); |