Return Time value from database
In a datebase i have stored a time value, when i use a resultset to retrieve this value from the database by usingTime time = rs.getTime("time");in the database the value is 20:29:00 but the value returned by time is 00:00:00. why isnt this returning the correct value?
[290 byte] By [
paulunda] at [2007-11-27 1:10:54]

# 7
try{
Statement command = conn.createStatement();
rs= command.executeQuery("SELECT * FROM table");
while(rs.next()){
Time time = rs.getTime("Time");
System.out.println(time);
}
}
on the System.out.println(time) the output is 00:00:00 wen it should be something like 20:29:59.