Time Intervals
Explore how PostgreSQL handles the interval data type alongside date and time types. Learn to work with durations like months or minutes and understand PostgreSQL's calendar-aware interval computations to manage temporal data precisely.
We'll cover the following...
We'll cover the following...
The interval data type
PostgreSQL implements an interval data type along with the time, date, and timestamptz data types. An interval describes a duration, such as a month, two weeks, or even a millisecond:
The default PostgreSQL output looks like this:
interval │ interval │ ?column? │ ?column? ...