DATE

A PostgreSQL column type that holds a calendar date, validates it, sorts it and supports date arithmetic.

In more detail

A DATE column cannot hold the thirty-first of February, and subtracting two dates gives an interval. SQLite has no date type, so the course stores dates as year-month-day text and uses SQLite's date functions on it.

Example

added_on DATE NOT NULL DEFAULT CURRENT_DATE

Related terms

Taught in

References