Skip to Content
Learning Google BigQuery
book

Learning Google BigQuery

by Thirukkumaran Haridass, Eric Brown
December 2017
Beginner to intermediate
264 pages
5h 38m
English
Packt Publishing
Content preview from Learning Google BigQuery

Date Time Functions

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()) ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Google BigQuery: The Definitive Guide

Google BigQuery: The Definitive Guide

Valliappa Lakshmanan, Jordan Tigani
Google BigQuery Analytics

Google BigQuery Analytics

Siddartha Naidu, Jordan Tigani

Publisher Resources

ISBN: 9781787288591Supplemental Content