PostgreSQLDate/Time FunctionsCURRENT_TIMESTAMP
CURRENT_TIME

CURRENT_TIMESTAMPDate/Time Functions

EXTRACT

Returns the current timestamp.

Syntax

CURRENT_TIMESTAMP

Example

Enter values below to update the example in real time.

order_id
created_at
elapsed
orders
SELECT order_id, CURRENT_TIMESTAMP - created_at AS elapsed
FROM orders;