全部产品
Search
文档中心

云原生大数据计算服务 MaxCompute:CURRENT_TIMESTAMP

更新时间:Jan 17, 2024

CURRENT_TIMESTAMP函数为MaxCompute 2.0扩展函数,支持获取数据库服务器当前TIMESTAMP类型的时间。

命令格式

timestamp current_timestamp()

返回值说明

返回TIMESTAMP类型。

使用示例

--返回'2017-08-03 11:50:30.661'。
set odps.sql.type.system.odps2=true;
select current_timestamp(); 

相关函数

CURRENT_TIMESTAMP函数属于日期函数,更多日期计算、日期转换的相关函数请参见日期函数