PostgreSQL CURRENT_DATE Function (original) (raw)

Last Updated : 15 Jul, 2025

The **PostgreSQL CURRENT_DATE function is used to retrieve the current date. It’s a simple and effective way to ensure your database operations are using the correct date, particularly for applications that need timestamp records.

Let us better understand the **CURRENT_DATE Function in **PostgreSQL from this article.

**Syntax

CURRENT_DATE

**Return value:

The '**CURRENT_DATE' function returns a 'DATE' value that represents the current date.

PostgreSQL CURRENT_DATE Function Examples

Let us take a look at some of the examples of the CURRENT_DATE Function in PostgreSQL to better understand the concept.

**Example 1: Retrieve the Current Date

The following statement shows how to use the '**CURRENT_DATE' function to get the current date:

**SELECT CURRENT_DATE;

**Output:

PostgreSQL CURRENT_DATE Function Example

**Example 2: Using CURRENT_DATE as a Default Value

The **CURRENT_DATE function can be used as a default value of a column. So create a table named '****delivery'**for demonstration:

PostgreSQL `

CREATE TABLE delivery( delivery_id serial PRIMARY KEY, product varchar(255) NOT NULL, delivery_date DATE DEFAULT CURRENT_DATE ); INSERT INTO delivery(product) VALUES('Data Structure And Algorithm Edition 1'); SELECT * FROM delivery;

`

**Output:

PostgreSQL CURRENT_DATE Function Example

Important Points About PostgreSQL CURRENT_DATE Function