List of utility methods to do SQL Date Get
String | getDate() get Date return new Timestamp(System.currentTimeMillis()).toString().substring(0, 10); |
String | getDate() RETURN DATE Timestamp ts = null; try { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); String d = sdf.format(new java.util.Date()); ts = Timestamp.valueOf(d); } catch (Exception ex) { ex.printStackTrace(); return ts.toString().substring(8, 10); |
String | getDate() get Date Timestamp ts = getCurrentTimestamp(); SimpleDateFormat format = new SimpleDateFormat("MM/dd/yy"); return format.format(ts); |
Date | getDate() get Date return java.sql.Date.valueOf(getFormatDate("yyyy-MM-dd")); |
Date | getDate() get Date return new Date(); |
Date | getDate() get Date return currentDate();
|
Date | getDate() Buat object java.sql.Date dari hari ini. LocalDate localDate = getNowLocalDate();
return toDate(localDate);
|
Date | getDate(Calendar pCal) Get Date from Calendar. java.util.Date date = pCal.getTime(); return new java.sql.Date(date.getTime()); |
java.sql.Date | getDate(Date date) get Date Calendar cal = Calendar.getInstance(); cal.setTime(date); return new java.sql.Date(cal.getTimeInMillis()); |
long | getDate(Date value) Gets the date. return value == null ? -1 : value.getTime();
|