数据仓库服务 GAUSSDB(DWS)-时间/日期函数:trunc(timestamp)

时间:2024-01-26 16:15:18

trunc(timestamp)

描述:默认按天截取。

返回值类型:timestamp

示例:

1
2
3
4
SELECT trunc(timestamp  '2001-02-16 20:38:40');                                                                                                                                                                   trunc
---------------------
2001-02-16 00:00:00
(1 row)
support.huaweicloud.com/sqlreference-820-dws/dws_06_0309.html