List of utility methods to do SQL Time From
String | getDateTimeStringFromCalendar(Calendar calendar) get Date Time String From Calendar String dateString = nameOfDay[calendar.get(Calendar.DAY_OF_WEEK)] + " "; dateString += getDateAsString(calendar.get(Calendar.MONTH) + 1, calendar.get(Calendar.DATE), calendar.get(Calendar.YEAR)); dateString += (" " + calendar.get(Calendar.HOUR_OF_DAY) + ":" + calendar.get(Calendar.MINUTE) + ":" + calendar.get(calendar.SECOND) + " " + ZONE); return dateString; |
String | getDateTimeTypeString(Connection conn) get Date Time Type String if (isOracleServer(conn)) return "DATE"; return "DATETIME"; |
String | getDateTimeTypeString(Connection conn) get Date Time Type String if (isOracleServer(conn)) return "DATE"; return "DATETIME"; |
DateTime | toDateTime(final java.util.Date d) to Date Time final DateTime dt = (d == null ? null : new DateTime(d)); return dt; |
java.sql.Timestamp | toDatetime(long value) to Datetime final int sec = (int) (value % 100); value /= 100; final int min = (int) (value % 100); value /= 100; final int hour = (int) (value % 100); value /= 100; final int day = (int) (value % 100); value /= 100; ... |
String | toDateTimeString(java.util.Date inDate) Description of the Method try { return java.text.DateFormat.getDateTimeInstance(java.text.DateFormat.SHORT, java.text.DateFormat.LONG) .format(inDate); } catch (NullPointerException e) { return ""; |
java.sql.Time | toSQLTime(final LocalTime lt) to SQL Time final java.sql.Time t = (lt == null ? null : new java.sql.Time(lt.getMillisOfDay())); return t; |
java.sql.Time | toSqlTime(long date) to Sql Time return new java.sql.Time(date); |
Time | toTime(Date value) to Time if (value instanceof Time) { return (Time) value; final Calendar cal = Calendar.getInstance(); cal.setTime((Date) value); return new java.sql.Time(cal.getTimeInMillis()); |
Time | toTime(final Date date) to Time return new Time(date.getTime()); |