Product Solutions Support
Try MemSQL

TIMESTAMPADD

Adds the given interval of time to a date or datetime object

TIMESTAMPADD ({YEAR | QUARTER | MONTH | WEEK | DAY | HOUR | MINUTE | SECOND | MICROSECOND}, num, dateobj)

Arguments

Return Type

Time object. If dateobj is not a valid time, returns NULL.

Examples

memsql> select timestampadd(YEAR, 6, '2009-02-13 23:31:30');
+----------------------------------------------+
| timestampadd(YEAR, 6, '2009-02-13 23:31:30') |
+----------------------------------------------+
| 2015-02-13 23:31:30                          |
+----------------------------------------------+
Was this article useful?