Beginner

118. Date Addition

Learn how to add days, months, or other time intervals to a date.

📘 Lesson 118 of 728 ⏱ 8 min 🎯 Beginner

Date addition means calculating a new date by adding a specified time interval to an existing date. SQL syntax differs between database systems.

Adding intervals is useful for calculating due dates, renewal dates, review dates, payment deadlines, and future events.

A payment system may calculate a due date by adding 30 days to the invoice date.

SQL
SELECT
    InvoiceDate,
    InvoiceDate + INTERVAL '30' DAY AS DueDate
FROM Invoices;

Date addition is useful for loan schedules, insurance renewals, invoice due dates, employee reviews, and service deadlines.

  • Date addition creates a future or adjusted date.
  • Days, months, and other intervals can be added.
  • Syntax varies between database systems.
  • It is useful for deadline calculations.
  • Date arithmetic is common in business applications.
What is date addition?

Date addition calculates a new date by adding a specified interval to an existing date.

Where is date addition useful?

It is useful for calculating due dates, renewal dates, deadlines, and future business events.

Have you finished this lesson?

Introduction to SQL – All Lessons