List of utility methods to do SQL Date from Util Date
java.sql.Date | getSQLDate(final Date oDate) get SQL Date if (null == oDate) { return null; final Calendar c = Calendar.getInstance(); c.setTime(oDate); c.set(Calendar.HOUR_OF_DAY, 0); c.set(Calendar.MINUTE, 0); c.set(Calendar.SECOND, 0); ... |
java.sql.Date | getSqlDate(java.util.Date utilDate) converts a java.util.Date to java.sql.Date return new java.sql.Date(utilDate.getTime()); |
String | getSqlDateDefaultFormat(java.sql.Date date) get Sql Date Default Format String str = null; try { if (date != null) str = date.toString(); } catch (Exception e) { return str; |
java.sql.Date | getSqlDateFromDateNumber(short dateNumber) get Sql Date From Date Number return new java.sql.Date(dateNumber * (1000L * 60 * 60 * 24)); |