Syntax
TIMESTAMP(expr)
TIMESTAMP(expr1,expr2)
Purpose
The first syntax returns the datetime value of the datetime expression expr.
The second syntax returns the datetime sum of the datetime expression expr1 and the time expression expr2. 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
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