List of utility methods to do SQL Time
void | resetNetworkTimeout(Connection rawConnection, Executor executor, int oldTimeout) reset Network Timeout if (oldTimeout >= 0)
rawConnection.setNetworkTimeout(executor, oldTimeout);
|
Object | roundDatetimeValue(Object value) Utility method for a datetime value if (value == null) return null; Timestamp ts = value instanceof Timestamp ? (Timestamp) value : new Timestamp(((Calendar) value).getTimeInMillis()); int millis = ts.getNanos() / 1000000; int lastDigit = (int) (millis % 10); switch (lastDigit) { case 1: ... |
Object | roundSmallDateTimeValue(Object value) Utility method for a datetime value if (value == null) { return null; Calendar cal; java.sql.Timestamp ts = null; int nanos = -1; if (value instanceof Calendar) { cal = (Calendar) value; ... |
boolean | saveGameScores(String gameName, String player1, String player2, String player3, String player4, short score1, short score2, short score3, short score4, java.util.Date startTime) DOCUMENT ME! if (checkConnection()) { try { saveGameCommand.setString(1, gameName); saveGameCommand.setString(2, player1); saveGameCommand.setString(3, player2); saveGameCommand.setString(4, player3); saveGameCommand.setString(5, player4); saveGameCommand.setShort(6, score1); ... |
String | serialize(LocalDateTime date) serialize return date.format(ISO_FORMAT);
|
String | serializeSqlTime(Time time) Serialize time to standard text. StringBuffer buff = new StringBuffer(12); serializeTime((int) time.getTime(), buff); return buff.toString(); |
void | setTime(PreparedStatement statement, int index, Date value) Sets a SQL parameter of type time using a prepared SQL statement, an index and a value. if (statement != null) { if (value == null) { statement.setNull(index, Types.TIME); } else { statement.setTime(index, new java.sql.Time(value.getTime())); |
java.sql.Timestamp | sqlDateTimeAdd(java.util.Date date, long milliseconds) sql Date Time Add long ct; if (date == null) { ct = System.currentTimeMillis(); } else { ct = date.getTime(); return new java.sql.Timestamp(ct + milliseconds); |
java.sql.Time | sqlTime() sql Time return sqlTime(null);
|
Timestamp | str2dateTime(String handedate) strdate Time Timestamp time = null; try { java.util.Date date = str2utilDate(handedate); java.util.Date now = new java.util.Date(); date.setHours(now.getHours()); date.setMinutes(now.getMinutes()); date.setSeconds(now.getSeconds()); time = new Timestamp(date.getTime()); ... |