下面提到的查詢返回空,但我內心的查詢取像 MySQL的時間日期轉換取空值
SELECT CONCAT(
FLOOR(HOUR(time_milis)/24), ' ',
MOD(HOUR(time_milis), 24), ':',
MINUTE(time_milis),':',
SECOND(time_milis))
FROM (
SELECT SUM(TIMEDIFF(logout_timestamp,login_timestamp)) AS time_milis FROM t_access_log WHERE logout_timestamp!='0000-00-00 00:00:00' GROUP BY login_id
)se
值爲什麼不使用DATE_FORMAT()這個東西我在這裏缺少
[HOUR()](https://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_hour)在工作時間上不整數 – bansi