Skip to content
SQLSimplified
date

CURRENT_TIMESTAMP()

Returns the current date and time (with time zone in some engines).

Description

CURRENT_TIMESTAMP returns the current date and time according to the server's clock, including the time of day (and often the session time zone). It's a zero-argument function used for audit columns, "now" comparisons, and time-based defaults.

Syntax

CURRENT_TIMESTAMP

Parameters

None.

Return Type

Returns a TIMESTAMP (or TIMESTAMPTZ where time zones are tracked).

Examples

Loading playground environment...
Loading playground environment...

CURRENT_TIMESTAMP vs NOW

They're usually equivalent. NOW() is a function-call form; CURRENT_TIMESTAMP is the standard keyword form.

Common Mistakes

  • Adding parentheses. Standard SQL uses CURRENT_TIMESTAMP without ().
  • Time zone assumptions. The value may be in UTC or the session zone; be explicit when comparing across zones.
  • Re-evaluation. In some engines it's fixed for the transaction; in others it can vary per row. Know your database.

See also: CURRENT_DATE, NOW, EXTRACT.

Cite this resource

SQLSimplified. "CURRENT_TIMESTAMP() SQL Function". Available at: https://sqlsimplified.online/reference/current-timestamp