DATE-TIME data types

Synopsis

The DATE, TIME, TIMESTAMP, and INTERVAL data types are supported in YSQL.

Data typeDescriptionMinMax
TIMESTAMP [ (p) ] [ WITHOUT TIME ZONE ]8-byte date and time4713 BC294276 AD
TIMESTAMP [ (p) ] WITH TIME ZONE8-byte date and time4713 BC294276 AD
DATE4-byte date4713 BC5874897 AD
TIME [ (p) ] [ WITHOUT TIME ZONE ]8-byte time of day00:00:0024:00:00
TIME [ (p) ] WITH TIME ZONE12-byte time of day00:00:00+145924:00:00-1459
INTERVAL [ fields ] [ (p) ]16-byte time interval-178000000 years178000000 years

Description

Date and time inputs can be in various formats, including ISO, SQL, Postgres-extension, and many others.