date type

date data expresses a date without a specified time.

Detail Info
Quick Syntax DATE '2007-02-01'
Size 1 byte
Catalog name pg_catalog.date
OID 1082
Min value 4714-11-24 BC
Max value 262143-12-31 AD
Resolution 1 day

Syntax

Details

Valid casts

From date

You can cast date to:

To date

You can cast from the following types to date:

Valid operations

time data supports the following operations with other types.

Operation Computes
date + interval timestamp
date - interval timestamp
date + time timestamp
date - date interval

Examples

SELECT DATE '2007-02-01' AS date_v;
   date_v
------------
 2007-02-01
Back to top ↑