List of utility methods to do SQL Date Convert
java.util.Date | toJavaDate(java.sql.Date date) to Java Date if (date == null) { return null; return new java.util.Date(date.getTime()); |
Date | toJavaDate(java.sql.Date sqlDate) to Java Date return sqlDate == null ? null : new Date(sqlDate.getTime()); |
long | toLong(java.util.Date v) to Long return toLong(v, LOCAL_TZ);
|
String | toName(Date date) to Name SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd"); return sf.format(date); |
int | totalUpdateCount(int[] result) Summarize the returned array of java.sql.Statement#executeBatch() int total = 0; for (int i : result) { if (i >= 0) { total += i; return total; |
String | toYMD(Date date, String datePtn) to YMD if (date == null) { return null; return toString(date, getYMDFormat(datePtn)); |