Date operators

You can modify dates. In the following, hire_date is DATE '2028-01-30'.

Operator

Effect on date

Example

Result

+

Add a number of days to a date

Copy
hire_date + 5

DATE '2028-02-04'

-

Find the number of days between two dates

Copy
hire_date - DATE '2028-01-01'

29

Subtract a number of days from a date

Copy
hire_date - 10

DATE '2028-01-20'

Additional examples

Copy
SELECT Date_Sold, Date_Sold + 30 AS agg FROM Sales_Data
SELECT Date_Sold, Date_Sold - 30 AS agg FROM Sales_Data