Skip to main content

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.

OperatorOperandDescription
+BinaryAdds dates and times, equivalent to the DATE_ADD function. See DATE_ADD.
-BinarySubtracts 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)