Skip to content

CURRENT_TIMESTAMP

SELECT CURRENT_TIMESTAMP;
+---------------------+
| CURRENT_TIMESTAMP |
+---------------------+
| 2022-01-01 10:23:45 |
+---------------------+

This example selects the current date and time from the server where the database is running, returned in ‘YYYY-MM-DD HH:MM:SS’ format. In MySQL, CURRENT_TIMESTAMP is a function that retrieves the current date and time.