EasyDate & Time Functions

Date arithmetic: add/subtract intervals

The query

SQL
SELECT
  CURRENT_DATE AS today,
  CURRENT_DATE + INTERVAL '7 days' AS next_week,
  CURRENT_DATE - INTERVAL '1 month' AS last_month,
  CURRENT_DATE + INTERVAL '1 year' AS next_year,
  CURRENT_DATE - hire_date AS days_employed
FROM employees
LIMIT 5;
Tested against PostgreSQL 16

Note

INTERVAL supports: seconds, minutes, hours, days, weeks, months, years, and combinations.

Tables referenced