我已经忙了好几个小时了,但是我无法正常工作。
SQL SELECT DATEDIFF(end_time, start_time) as `difference` FROM timeattendance WHERE timeattendance_id = '1484' start_time = 2012-01-01 12:00:00 end_time = 2012-01-02 13:00:00
时差为25(小时)。但是我得到的输出是1(天)。
如何获得25小时的输出?
关于使用TIMESTAMPDIFF呢?
SELECT TIMESTAMPDIFF(HOUR, start_time, end_time) as `difference` FROM timeattendance WHERE timeattendance_id = '1484'