Javatpoint Logo
Javatpoint Logo

MySQL CURRENT_TIMESTAMP() Function

The current_timestamp() is a MySQL date/time function. It is used to get the current date and time.

Syntax

Parameter

NA

Returns

The current_timestamp function returns the current date and time. It will return the current date as a 'YYYY-MM-DD HH:MM:SS' format if used in a string context. It will return the current date as a YYYYMMDDHHMMSS format if used in a numeric context.

Example 1

Output:


MySQL CURRENT_TIMESTAMP() Function

Example 2

Output:


MySQL CURRENT_TIMESTAMP() Function
Next TopicMySQL date/time




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA