DATE_SUB()
This page is part of MariaDB's Documentation.
The parent of this page is: Functions for MariaDB Enterprise Server
Topics on this page:
Overview
Performs an arithmetic operation on the given date, subtracting the interval expression by the given units.
EXAMPLES
SELECT DATE_SUB('2019-01-15',INTERVAL 2 YEAR);
+----------------------------------------+
| DATE_SUB('2019-01-15',INTERVAL 2 YEAR) |
+----------------------------------------+
| 2017-01-15 |
+----------------------------------------+
CHANGE HISTORY
EXTERNAL REFERENCES
Additional information on this topic may be found in the MariaDB Public Knowledge Base.