I am working with java to retrieve the values of a time column in a table in mysql.
The code below shows the request I am sending.
String query="select id,time from table where Hour(time)<=32 ";
ResultSet res = stmt.executeQuery(query);
while (res.next()) {
String id = res.getString(1);
Time tc = res.getTime("time");
System.out.println(tc);
}
time values can be negative (-56: 00: 00, which means that we have exceeded a certain delay. the problem is what I get: java.sql.SQLException: java.sql.SQLException: Bad formatfor Time '-05: 48: 49' in column 2.
thank you for your help.
daria source
share