TIMESTAMPADD()
This page is part of MariaDB's Documentation.
The parent of this page is: Functions for MariaDB Enterprise Server
Topics on this page:
Overview
Adds the integer expression interval to the date or datetime expression datetime_
EXAMPLES
SELECT TIMESTAMPADD(MINUTE,1,'2020-01-02');
+-------------------------------------+
| TIMESTAMPADD(MINUTE,1,'2020-01-02') |
+-------------------------------------+
| 2020-01-02 00:01:00 |
+-------------------------------------+
SELECT TIMESTAMPADD(WEEK,2,'2020-01-02');
+-----------------------------------+
| TIMESTAMPADD(WEEK,2,'2020-01-02') |
+-----------------------------------+
| 2020-01-16 |
+-----------------------------------+
SELECT TIMESTAMPADD(MONTH,1,'2020-01-02');
+------------------------------------+
| TIMESTAMPADD(MONTH,1,'2020-01-02') |
+------------------------------------+
| 2020-02-02 |
+------------------------------------+
SELECT TIMESTAMPADD(YEAR,1,'2019-01-02');
+-----------------------------------+
| TIMESTAMPADD(YEAR,1,'2019-01-02') |
+-----------------------------------+
| 2020-01-02 |
+-----------------------------------+
CHANGE HISTORY
EXTERNAL REFERENCES
Additional information on this topic may be found in the MariaDB Public Knowledge Base.