w3resource

PostgreSQL CLOCK_TIMESTAMP() function

CLOCK_TIMESTAMP() function

The clock_timestamp() function shows current date and time (changes during statement execution).

Syntax:

clock_timestamp()

Return Type: timestamp with time zone.

PostgreSQL Version: 9.3

Pictorial Presentation of PostgreSQL CLOCK_TIMESTAMP() function

Pictorial presentation of PostgreSQL CLOCK_TIMESTAMP() function

Example: PostgreSQL CLOCK_TIMESTAMP() function

Code:

SELECT clock_timestamp();

Sample Output:

      clock_timestamp
----------------------------
 2015-01-14 15:49:26.086-08
(1 row)

N.B. - The outputs depending upon the current date and time.

Previous: AGE function
Next: CURRENT_DATE function