Bigquery Functions
Timestamp Functions
current_timestamp
Supported Signatures
function current_timestamp() returns timestamp
format_timestamp
Supported Signatures
function format_timestamp $1(string, $1) returns string
where $1 in (timestamp, datetime)
function format_timestamp(string, timestamp, time_zone string) returns string
parse_timestamp
Supported Signatures
function parse_timestamp(string, string) returns timestamp
function parse_timestamp(string, string, time_zone string) returns timestamp
timestamp
Supported Signatures
function 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_add
Supported Signatures
function timestamp_add $1($1, interval) returns $1
where $1 in (timestamp, datetime)
timestamp_diff
Supported Signatures
function 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, datetime)
timestamp_micros
Supported Signatures
function timestamp_micros(int64) returns timestamp
timestamp_millis
Supported Signatures
function timestamp_millis(int64) returns timestamp
timestamp_seconds
Supported Signatures
function timestamp_seconds(int64) returns timestamp
timestamp_sub
Supported Signatures
function timestamp_sub $1($1, interval) returns $1
where $1 in (timestamp, datetime)
timestamp_trunc
Supported Signatures
function 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, datetime)
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_micros
Supported Signatures
function unix_micros(timestamp) returns int64
unix_millis
Supported Signatures
function unix_millis(timestamp) returns int64
unix_seconds
Supported Signatures
function unix_seconds(timestamp) returns int64