Cloud
current_timestamp
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. |
Arguments
-
precision: Optional. An integer literal from 0 to 6 that controls how many fractional-second digits to include. When omitted, the function returns full microsecond precision (6 digits).
Examples
Default precision
This example returns the current date and time with full microsecond precision:
SELECT CURRENT_TIMESTAMP AS "Current Time";
The final result will display the current date and time in the timezone in which it was issued:
-----------------------------
Current Time
-----------------------------
2022-08-31 16:56:06.464016
-----------------------------
Was this helpful?