Bigquery Functions
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_timestampfunction current_timestamp() returns timestamp
format_timestampfunction format_timestamp $1(string, $1) returns string
where $1 in (timestamp, date)
function format_timestamp(string, timestamp, time_zone string) returns string
parse_timestampfunction parse_timestamp(string, string) returns timestamp
function parse_timestamp(string, string, time_zone string) returns timestamp
timestampfunction timestamp(string) returns timestamp
function timestamp(string, time_zone string) returns timestamp
function timestamp(date) returns timestamp
function timestamp(date, time_zone string) returns timestamp
function timestamp(datetime) returns timestamp
function timestamp(datetime, time_zone string) returns timestamp
timestamp_addfunction timestamp_add $1($1, interval) returns $1
where $1 in (timestamp, date)
timestamp_difffunction timestamp_diff $1($1, $1, date_part string) returns bigint
where date_part in (microsecond, millisecond, second, minute, hour, day, week, month, quarter, year)
where $1 in (timestamp, date)
timestamp_microsfunction timestamp_micros(int64) returns timestamp
timestamp_millisfunction timestamp_millis(int64) returns timestamp
timestamp_secondsfunction timestamp_seconds(int64) returns timestamp
timestamp_subfunction timestamp_sub $1($1, interval) returns $1
where $1 in (timestamp, date)
timestamp_truncfunction timestamp_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 (timestamp, date)
function timestamp_trunc(timestamp, date_time_part string, time_zone string) returns timestamp
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)
unix_microsfunction unix_micros(timestamp) returns int64
unix_millisfunction unix_millis(timestamp) returns int64
unix_secondsfunction unix_seconds(timestamp) returns int64