Retrieve the current date and/or time from the database server. Each engine has multiple synonyms with subtle differences around timezone awareness and precision.

Return the current date, time, or timestamp at query execution time. Useful for filtering by today or recording creation timestamps. CURRENT_TIMESTAMP and NOW() are often synonymous; verify behavior in your engine.

Compatibility

Show:
Database System Support Status Since Version Notes
MySQL ✓ Supported all NOW() returns datetime in session timezone. CURRENT_TIMESTAMP is a synonym. SYSDATE() returns the time at the moment of execution (differs from NOW() inside stored procs). UTC_TIMESTAMP() for UTC. CURDATE() / CURTIME() for date or time only.
PostgreSQL ✓ Supported all NOW() and CURRENT_TIMESTAMP return timestamptz (with timezone) fixed at transaction start — the same value is returned throughout a transaction. CLOCK_TIMESTAMP() returns the real current time (changes mid-transaction). CURRENT_DATE and CURRENT_TIME also available.
SQL Server ✓ Supported all GETDATE() returns local server time as datetime. GETUTCDATE() for UTC. SYSDATETIME() returns higher-precision datetime2. SYSUTCDATETIME() for UTC datetime2. CURRENT_TIMESTAMP is a synonym for GETDATE().
Oracle ✓ Supported all SYSDATE returns server date/time without timezone (DATE type). SYSTIMESTAMP returns with timezone (TIMESTAMP WITH TIME ZONE). CURRENT_DATE and CURRENT_TIMESTAMP return session timezone values.
SQLite ✓ Supported all No dedicated function — use datetime(), date(), or time() with 'now'. Always returns UTC. CURRENT_TIMESTAMP, CURRENT_DATE, and CURRENT_TIME are also available as SQL-standard aliases.

Details

PostgreSQL's NOW() is fixed at transaction start — call CLOCK_TIMESTAMP() if you need it to advance mid-transaction. Oracle's SYSDATE has no timezone, SYSTIMESTAMP does — easy to mix up. SQLite always returns UTC from 'now' and requires an explicit 'localtime' modifier. SQL Server's GETDATE() precision is milliseconds; use SYSDATETIME() for microseconds.

Standard Syntax

SELECT CURRENT_TIMESTAMP; -- SQL standard, returns date+time

Version Support

MySQL: Since all PostgreSQL: Since all SQL Server: Since all Oracle: Since all SQLite: Since all

Per-Database Syntax & Notes

MySQL

NOW() returns datetime in session timezone. CURRENT_TIMESTAMP is a synonym. SYSDATE() returns the time at the moment of execution (differs from NOW() inside stored procs). UTC_TIMESTAMP() for UTC. CURDATE() / CURTIME() for date or time only.

SELECT NOW(); -- '2024-03-15 14:23:01' SELECT CURRENT_TIMESTAMP; -- same as NOW() SELECT UTC_TIMESTAMP(); -- UTC SELECT CURDATE(); -- '2024-03-15' SELECT CURTIME(); -- '14:23:01'

PostgreSQL

NOW() and CURRENT_TIMESTAMP return timestamptz (with timezone) fixed at transaction start — the same value is returned throughout a transaction. CLOCK_TIMESTAMP() returns the real current time (changes mid-transaction). CURRENT_DATE and CURRENT_TIME also available.

SELECT NOW(); -- transaction start time, with tz SELECT CURRENT_TIMESTAMP; -- same as NOW() SELECT CLOCK_TIMESTAMP(); -- actual wall clock (changes mid-tx) SELECT CURRENT_DATE; -- '2024-03-15' SELECT CURRENT_TIME; -- '14:23:01.123456+00'

SQL Server

GETDATE() returns local server time as datetime. GETUTCDATE() for UTC. SYSDATETIME() returns higher-precision datetime2. SYSUTCDATETIME() for UTC datetime2. CURRENT_TIMESTAMP is a synonym for GETDATE().

SELECT GETDATE(); -- '2024-03-15 14:23:01.123' SELECT GETUTCDATE(); -- UTC datetime SELECT SYSDATETIME(); -- datetime2 (higher precision) SELECT CURRENT_TIMESTAMP; -- synonym for GETDATE()

Oracle

SYSDATE returns server date/time without timezone (DATE type). SYSTIMESTAMP returns with timezone (TIMESTAMP WITH TIME ZONE). CURRENT_DATE and CURRENT_TIMESTAMP return session timezone values.

SELECT SYSDATE FROM DUAL; -- server local, no timezone SELECT SYSTIMESTAMP FROM DUAL; -- with timezone, high precision SELECT CURRENT_DATE FROM DUAL; -- session timezone SELECT CURRENT_TIMESTAMP FROM DUAL; -- session timezone with tz

SQLite

No dedicated function — use datetime(), date(), or time() with 'now'. Always returns UTC. CURRENT_TIMESTAMP, CURRENT_DATE, and CURRENT_TIME are also available as SQL-standard aliases.

SELECT datetime('now'); -- '2024-03-15 14:23:01' (UTC) SELECT datetime('now', 'localtime'); -- converted to local time SELECT CURRENT_TIMESTAMP; -- same as datetime('now') SELECT date('now'); -- '2024-03-15'