Current_Time

Returns the current time.

Synopsis

CURRENT_TIME

Parameters

This function does not accept any parameters.

Results

time

The current time. The return data type is time.

Description

Use the CURRENT_TIME function to retrieve the current system-recorded time in an object of data type TIME.

Examples

The following example retrieves the current time:

testdb=# SELECT CURRENT_TIME AS the_time;
 the_time
----------
 19:44:35
(1 row)

Get Practical PostgreSQL now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.