CURRENT_TIMESTAMP
Returns the current date and time with the time zone.
PostgreSQL 17.5
CURRENT_TIMESTAMP[(precision)]Parameters
- precisionintegeroptional
- Number of fractional digits of the seconds, 0 to 6; all 6 by default
Return value
A timestamp with time zone (timestamptz) at the start of the transaction, same as NOW()
Examples
Current date and time
PostgreSQL 17.5
SELECT CURRENT_TIMESTAMP;Without fractional seconds
PostgreSQL 17.5
SELECT CURRENT_TIMESTAMP(0);Details
Without precision it is written without parentheses: unlike NOW(), CURRENT_TIMESTAMP() causes a syntax error. The time zone comes from the TimeZone setting, which is UTC in the sandbox; a precision above 6 is reduced to 6.