TIMESTAMP
Convert to datetime or add time. With one argument, it returns a datetime; with two, it adds a time expression to a date or datetime.
Syntax
TIMESTAMP(expr), TIMESTAMP(expr1,expr2)Description
Examples
SELECT TIMESTAMP('2003-12-31');
+-------------------------+
| TIMESTAMP('2003-12-31') |
+-------------------------+
| 2003-12-31 00:00:00 |
+-------------------------+
SELECT TIMESTAMP('2003-12-31 12:00:00','6:30:00');
+--------------------------------------------+
| TIMESTAMP('2003-12-31 12:00:00','6:30:00') |
+--------------------------------------------+
| 2003-12-31 18:30:00 |
+--------------------------------------------+Last updated
Was this helpful?

