The following table lists all the date and time operators.
| Operator | Operand | Description |
|---|---|---|
+ |
Binary | The same as the DATE_ADD function. |
- |
Binary | The same as the DATE_SUB function. |
Example:
obclient> SELECT '2008-12-31 23:59:59' + INTERVAL 1 SECOND;
+-------------------------------------------+
| '2008-12-31 23:59:59' + INTERVAL 1 SECOND |
+-------------------------------------------+
| 2009-01-01 00:00:00 |
+-------------------------------------------+
1 row in set (0.01 sec)