MySQL CURRENT_TIMESTAMP() Function

In MySQL, the CURRENT_TIMESTAMP() function returns the current date and time in the YYYY-MM-DD hh:mm:ss or YYYYMMDDhhmmss format.

This function is exactly the same as the NOW() function.

CURRENT_TIMESTAMP() Syntax

Here is the syntax of MySQL CURRENT_TIMESTAMP() function:

CURRENT_TIMESTAMP
CURRENT_TIMESTAMP()

CURRENT_TIMESTAMP() Examples

Returns the current time of the system.

SELECT CURRENT_TIMESTAMP(), CURRENT_TIMESTAMP() + 1;
+---------------------+-------------------------+
| CURRENT_TIMESTAMP() | CURRENT_TIMESTAMP() + 1 |
+---------------------+-------------------------+
| 2022-04-12 02:29:32 |          20220412022933 |
+---------------------+-------------------------+

Here, the context of CURRENT_TIMESTAMP() is a mathematical operation within CURRENT_TIMESTAMP() + 1, so CURRENT_TIMESTAMP() returns a number in YYYYMMDDhhmmss format.