The CURRENT_TIMESTAMP function returns the current time as a TIMESTAMP value.
Syntax
TIMESTAMP CURRENT_TIMESTAMP()
-- A standard example.
-- Returns 2025-06-05 13:37:21.123.
SELECT CURRENT_TIMESTAMP();Parameters
This function does not take any parameters.
Return value
Returns a TIMESTAMP value. This value represents the current time in the time zone of the session or project.
If the millisecond part is 000, the returned value displays 0. If the millisecond part is x00, the returned value displays x. If the millisecond part is xx0, the returned value displays xx.
Examples
The following examples assume that the current system time is 2025-06-05 13:37:21.001 (UTC+8).
SET odps.sql.timezone=Asia/Shanghai;
-- Returns 2025-06-05 13:37:21.001.
SELECT CURRENT_TIMESTAMP();
SET odps.sql.timezone=Etc/GMT;
-- Returns 2025-06-05 05:37:21.001.
SELECT CURRENT_TIMESTAMP();Related functions
CURRENT_TIMESTAMP is a date function. For more information about other date functions, see Date functions.