December 2017
Beginner to intermediate
264 pages
5h 38m
English
The following function returns current date based on the UTC timezone not local timezone. The date is returned in YYYY-MM-DD. This function is supported in both legacy SQL and standard SQL.
SELECT CURRENT_DATE()
The following function returns current time based on UTC timezone not local timezone. The time is returned in HH:MM:SS format when the query is run in legacy SQL and it is returned with milliseconds when run in standard SQL.
SELECT CURRENT_TIME()
The following function returns the current date time at seconds level in UTC timezone.
SELECT CURRENT_TIMESTAMP()
The DATE function extracts the date from given TIMESTAMP value. The following query returns the current date based on UTC timezone.
SELECT DATE(CURRENT_TIMESTAMP()) ...