Syntax
TIMESTAMP(expr)
TIMESTAMP(expr1,expr2)
Purpose
You can use the first syntax to return the datetime value of the datetime expression expr.
You can use the second syntax to return the datetime sum of the datetime expression expr1 and the time expressionexpr2. If expr2 contains date and time, only the time part is used.
If any argument is NULL, this function returns NULL.
Examples
obclient> SELECT TIMESTAMP('2020-12-31');
+----------------------------+
TIMESTAMP('2020-12-31')
+----------------------------+
2020-12-31 00:00:00.000000
+----------------------------+
1 row in set (0.00 sec)
obclient> SELECT TIMESTAMP('2020-12-31 12:00:00','12:00:00');
+---------------------------------------------+
TIMESTAMP('2020-12-31 12:00:00','12:00:00')
+---------------------------------------------+
2021-01-01 00:00:00.000000
+---------------------------------------------+
1 row in set (0.00 sec)