milliseconds_diff
description
Syntax
INT milliseconds_diff(DATETIME enddate, DATETIME startdate)
开始时间到结束时间相差几毫秒
example
mysql> select milliseconds_diff('2020-12-25 21:00:00.623000','2020-12-25 21:00:00.123000');
+-----------------------------------------------------------------------------------------------------------------------------+
| milliseconds_diff(cast('2020-12-25 21:00:00.623000' as DATETIMEV2(6)), cast('2020-12-25 21:00:00.123000' as DATETIMEV2(6))) |
+-----------------------------------------------------------------------------------------------------------------------------+
| 500 |
+-----------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.03 sec)
keywords
milliseconds_diff