Overview

The CURRENT_TIMESTAMP() returns the current timestamp value representing the date and time the query was executed.

Note that the time returned by this function is the time when the query was executed.

Syntax

CURRENT_TIMESTAMP() or CURRENT_TIMESTAMP

Examples

The following example shows how to get the current date and time with a CURRENT_TIMESTAMP()function:

SELECT CURRENT_TIMESTAMP AS "Current Time";

The final result will display the current date and time in your timezone:

+-----------------------------+
| Current Time                |
+-----------------------------+
| 2022-08-31 16:56:06.464016  |
+-----------------------------+