Current_Timestamp
Returns the current date and time.
Synopsis
CURRENT_TIMESTAMP
Parameters
This function does not accept parameters.
Results
timestamp
The current date and the current time. The return data type is
timestamp
.
Description
Use the CURRENT_TIMESTAMP
function to retrieve the current date and
time in a data type of timestamp
.
Examples
The following example displays the result of a call to CURRENT_TIMESTAMP
:
testdb=# SELECT CURRENT_TIMESTAMP AS date_and_time;
date_and_time
----------------------
2001-09-04 19:48:21-08
(1 row)
Get Practical PostgreSQL now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.