SQL Resources/BigQuery/CURRENT_DATETIMECURRENT_DATETIME
The BigQuery CURRENT_DATETIME function returns the date and time at the moment the query is evaluated. By default the date time will be in UTC timezone but a specific timezone can be selected.
CURRENT_DATETIME([time_zone])
SELECT
CURRENT_DATETIME() AS datetime_utc,
CURRENT_DATETIME('Australia/Sydney') AS datetime_sydney,
CURRENT_DATETIME('+08:00') AS datetime_plus_8
datetime_utc
2021-02-12T12:26:04.844546
datetime_sydney
2021-02-12T23:26:04.844546
datetime_plus_8
2021-02-12T20:26:04.844546
- The returned data type is a DATETIME.
- The full list of supported timezone names can be found here.
- If the time_zone argument is NULL the function returns NULL.
Truly collaborative analytics platform
Count redefines how data teams plan, build and share their analysis. It's Miro, but for data.
Discover the most flexible SQL editor
Count redefines how analysts plan, build, and share their analysis. It's Miro, but for data.
Become a SQL Expert
Get five free SQL lessons from Count's Head of Data, Taylor Brownlow.