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

时间:2024-12-24 10:32:43

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-dws/dws_06_0309.html