SelectDB Cloud
SQL 手册
SQL 函数
日期函数
MICROSECONDS_DIFF

microseconds_diff

description

Syntax

INT microseconds_diff(DATETIME enddate, DATETIME startdate)

开始时间到结束时间相差几微秒

example

mysql> select microseconds_diff('2020-12-25 21:00:00.623000','2020-12-25 21:00:00.123000');
+-----------------------------------------------------------------------------------------------------------------------------+
| microseconds_diff(cast('2020-12-25 21:00:00.623000' as DATETIMEV2(6)), cast('2020-12-25 21:00:00.123000' as DATETIMEV2(6))) |
+-----------------------------------------------------------------------------------------------------------------------------+
|                                                                                                                      500000 |
+-----------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.12 sec)

keywords

microseconds_diff
© 2023 北京飞轮数据科技有限公司 京ICP备2022004029号 | Apache、Apache Doris 以及相关开源项目名称均为 Apache 基金会商标