milliseconds_sub

description

Syntax

DATETIMEV2 milliseconds_sub(DATETIMEV2 basetime, INT delta)

  • basetime: DATETIMEV2 类型起始时间
  • delta: 从 basetime 起需要扣减的毫秒数
  • 返回类型为 DATETIMEV2

example

  1. mysql> select milliseconds_sub('2023-09-08 16:02:08.435123', 1);
  2. +--------------------------------------------------------------------------+
  3. | milliseconds_sub(cast('2023-09-08 16:02:08.435123' as DATETIMEV2(6)), 1) |
  4. +--------------------------------------------------------------------------+
  5. | 2023-09-08 16:02:08.434123 |
  6. +--------------------------------------------------------------------------+
  7. 1 row in set (0.11 sec)

keywords

  1. milliseconds_sub