Bigquery Functions
Datetime Functions
Supported Signatures
Supported Signatures
Supported Signatures
Supported Signatures
Supported Signatures
Supported Signatures
Supported Signatures
Supported Signatures
โI
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
SDF is now a part of dbt Labs. Get live CTA previews, inline errors, and mesh support natively in the dbt platform. Learn more ยท Migrate to Fusion
current_datetimefunction current_datetime() returns datetime
function current_datetime(string) returns datetime
datetimefunction datetime(bigint, bigint, bigint, bigint, bigint, bigint) returns datetime
function datetime(date) returns datetime
function datetime(date, time) returns datetime
function datetime(timestamp) returns datetime
function datetime(timestamp, string) returns datetime
datetime_addfunction datetime_add $1($1, interval) returns $1
where $1 in (date, timestamp)
datetime_difffunction datetime_diff $1($1, $1, part string) returns bigint
where part in (microsecond, millisecond, second, minute, hour, day, week, week(monday), week(tuesday), week(wednesday), week(thursday), week(friday), week(saturday), week(sunday), isoweek, month, quarter, year, isoyear)
where $1 in (date, timestamp)
datetime_subfunction datetime_sub $1($1, interval) returns $1
where $1 in (date, timestamp)
datetime_truncfunction datetime_trunc $1($1, date_time_part string) returns $1
where date_time_part in (microsecond, millisecond, second, minute, hour, day, week, week(monday), week(tuesday), week(wednesday), week(thursday), week(friday), week(saturday), week(sunday), isoweek, month, quarter, year, isoyear)
where $1 in (date, timestamp)
format_datetimefunction format_datetime $1(string, $1) returns string
where $1 in (date, timestamp)
parse_datetimefunction parse_datetime(string, string) returns datetime