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

时间:2024-10-21 16:50:41

extract(field from timestamp)

描述:获取field指定精度的值。field的有效值参见EXTRACT

返回值类型:double precision

示例:

1
2
3
4
5
SELECT extract(hour from timestamp '2001-02-16 20:38:40');
 date_part 
-----------
        20
(1 row)
support.huaweicloud.com/sqlreference-830-dws/dws_06_0309.html