Date and time operators
seekdb supports date and time operators, which are equivalent to the specified date and time functions.
The following table lists the date and time operators supported in the current version of seekdb.
| Operator | Operand | Description |
|---|---|---|
+ | Binary | Adds dates and times, equivalent to the DATE_ADD function. See DATE_ADD. |
- | Binary | Subtracts dates and times, equivalent to the DATE_SUB function. See DATE_SUB. |
Here are some examples:
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.001 sec)