Categories:

Context Functions (General)

SYSTIMESTAMP¶

Returns the current timestamp for the system.

See also:

CURRENT_TIMESTAMP

Syntax¶

SYSTIMESTAMP()
Copy

Arguments¶

None. This function must be called with parentheses.

Returns¶

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

Usage notes¶

  • The setting of the TIMEZONE parameter affects the return value. The returned timestamp is in the time zone for the session.

  • The setting of the TIMESTAMP_TYPE_MAPPING parameter affects the return value. The returned timestamp is in the timestamp type for the session.

  • Do not use the returned value for precise time ordering between concurrent queries (processed by the same virtual warehouse) because the queries might be serviced by different compute resources (in the warehouse).

  • This function does not support the fract_sec_precision argument that is supported by the CURRENT_TIMESTAMP function.

Examples¶

Show the current system timestamp:

SELECT SYSTIMESTAMP();
Copy
+--------------------------+
| SYSTIMESTAMP()           |
|--------------------------|
| 2024-04-17 15:49:34.0800 |
+--------------------------+