now()

Current date and time (start of current transaction); see Section 9.9.5

Signature

now ( ) → timestamp with time zone

In other engines

PostgreSQLnow
MySQLNOW()
SQL ServerSYSDATETIME(), or GETDATE() for the older lower-precision type
OracleSYSTIMESTAMP, or SYSDATE without a timezone
SQLitedatetime('now'), which is UTC

PostgreSQL's now() is the transaction start time, not the clock — call it twice in one transaction and you get one answer. clock_timestamp() is the one that moves. SQLite's returns UTC regardless of the session.

Want to run this against your own PostgreSQL server from an iPhone, iPad or Mac? These are ours — every connection goes straight from the device to your database, with no account and no server of ours in between.

Signature and description adapted from the PostgreSQL manual, used under the PostgreSQL License. PostgreSQL is a registered trademark of the PostgreSQL Community Association of Canada. This page is not affiliated with the PostgreSQL Global Development Group.