Postgresql Now Function

PostgreSQL: now Function

In this PostgreSQL post explains how to use the PostgreSQL now function with syntax and examples.

Description

The PostgreSQL now function returns the current date and time with the time zone.

Syntax

The syntax for the now function in PostgreSQL is:

now( )

Parameters or Arguments

There are no parameters or arguments for the now function.

Note

  • The now function will return the current date as a 'YYYY-MM-DD HH:MM:SS.US+TZ' format.

Applies To

The now function can be used in the following versions of PostgreSQL:

  • PostgreSQL 9.4, PostgreSQL 9.3, PostgreSQL 9.2, PostgreSQL 9.1, PostgreSQL 9.0, PostgreSQL 8.4

Example

Let's look at some PostgreSQL now function examples and explore how to use the now function in PostgreSQL.

For example:

postgres=# SELECT now();
              now
-------------------------------

 2014-04-25 17:01:33.753769+00
(1 row)