仅在MYSQL DATEDIFF中显示小时 [英] Only show hours in MYSQL DATEDIFF
本文介绍了仅在MYSQL DATEDIFF中显示小时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经忙了好几个小时,但是我无法正常工作.
I've been busy with this for hours, but I cant get it to work.
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(天).
The difference is 25 (hours). But the output I get is 1 (day).
如何获得25小时的输出?
How can I get the 25 hours as output?
推荐答案
使用 查看全文