Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
将Unix时间戳转换为基于当前时区的DATETIME类型值。
DATETIME to_datetime(BIGINT unix_ts, INT scale)
unix_ts
1598306400
1598306400123
scale
0
3
6
DATETIME
NULL
SET time_zone = 'Asia/Shanghai'; SELECT to_datetime(1598306400); -- 返回: 2020-08-25 06:00:00 SELECT to_datetime(1598306400123, 3); -- 返回: 2020-08-25 06:00:00.123000