#openGauss #入门 #安装 #数据库 #开源
知识来源:docs-opengauss.osinfra.cn/zh/
-
date_trunc(text, timestamp)
描述:截取到参数text指定的精度。
返回值类型:interval、timestamp with time zone、timestamp without time zone
示例:
sql 代码解读复制代码openGauss=# SELECT date_trunc('hour', timestamp '2001-02-16 20:38:40'); date_trunc --------------------- 2001-02-16 20:00:00 (1 row)
#openGauss #入门 #安装 #数据库 #开源