microseconds_diff

description

Syntax

INT microseconds_diff(DATETIME enddate, DATETIME startdate)

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

example

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

keywords

  1. microseconds_diff