DATE_SUB() in MySQL — How It Works
What the MySQL DATE_SUB() function does, with an example.
Published October 19, 2026
DATE_SUB() subtracts a specified time interval from a date.
Key points
- Part of standard SQL functions available in MySQL for working with dates and times
Example
SELECT DATE_SUB(NOW(), INTERVAL 1 MONTH);