Categories:

Context Functions (General)

LOCALTIMESTAMP

Returns the current timestamp for the system.

ANSI-compliant alias for CURRENT_TIMESTAMP.

Syntax

LOCALTIMESTAMP()

LOCALTIMESTAMP
Copy

Arguments

None.

Returns

Returns the current system time. The data type of the returned value is TIMESTAMP_LTZ.

Usage Notes

  • To comply with ANSI standards, this function can be called without parentheses.

Examples

Show the current local time and local timestamp:

SELECT LOCALTIME(), LOCALTIMESTAMP();
Copy

Output:

+-------------+-------------------------------+
| LOCALTIME() |    LOCALTIMESTAMP()           |
+-------------+-------------------------------+
|    17:18:02 | 2018-09-28 17:18:02.826 -0700 |
+-------------+-------------------------------+
Copy