mysql计算两个时间字符串的时间间隔
解决方法:
1.时间间隔(秒)
SELECT TIMESTAMPDIFF(SECOND,'2019-03-04 12:12:12','2019-03-04 12:13:12');
2.时间间隔(分)
SELECT TIMESTAMPDIFF(MINUTE,'2019-03-04 12:12:12','2019-03-04 12:13:12');
3.时间间隔(时)
SELECT TIMESTAMPDIFF(HOUR,'2019-03-04 12:12:12','2019-03-04 13:13:12');