Skip to main content

current_date

Returns the current date as of the start of the query. Examples:
examples.sql
Supported Signatures
Note: current_date() is stable, i.e. might return a different value for a different query execution. ๐Ÿ”— Official Documentation

current_time

Returns the current time with time zone as of the start of the query. Examples:
examples.sql
Supported Signatures
Note: current_time() is stable, i.e. might return a different value for a different query execution. ๐Ÿ”— Official Documentation

current_timestamp

Returns the current timestamp with time zone as of the start of the query, with 3 digits of subsecond precision, Examples:
examples.sql
Supported Signatures
Note: current_timestamp() is stable, i.e. might return a different value for a different query execution. ๐Ÿ”— Official Documentation

date

This is an alias for CAST(x AS date). Supported Signatures
๐Ÿ”— Official Documentation

date_diff

Takes a unit, timestamp1, and timestamp2. Returns timestamp2 - timestamp1 expressed in terms of unit. Examples:
examples.sql
Supported Signatures
๐Ÿ”— Official Documentation

date_format

Formats timestamp as a string using format. Examples:
examples.sql
Supported Signatures
๐Ÿ”— Official Documentation

date_parse

Parses string into a timestamp using format. Supported Signatures
๐Ÿ”— Official Documentation

date_trunc

Returns x truncated to unit. Supported Signatures
๐Ÿ”— Official Documentation

day

Returns the day of the month from x. Examples:
examples.sql
Supported Signatures
๐Ÿ”— Official Documentation

day_of_month

This is an alias for day(). Supported Signatures
๐Ÿ”— Official Documentation

day_of_week

Returns the ISO day of the week from x. The value ranges from 1 (Monday) to 7 (Sunday). Supported Signatures
๐Ÿ”— Official Documentation

day_of_year

Returns the day of the year from x. The value ranges from 1 to 366. Supported Signatures
๐Ÿ”— Official Documentation

dow

This is an alias for day_of_week(). Supported Signatures
๐Ÿ”— Official Documentation

doy

This is an alias for day_of_year(). Supported Signatures
๐Ÿ”— Official Documentation

from_unixtime

Returns the UNIX timestamp unixtime as a timestamp with time zone. unixtime is the number of seconds since 1970-01-01 00.00.00 UTC. Examples:
examples.sql
Supported Signatures
๐Ÿ”— Official Documentation

hour

Returns the hour of the day from x. The value ranges from 0 to 23. Supported Signatures
๐Ÿ”— Official Documentation

localtimestamp

Returns the current timestamp as of the start of the query, with 3 digits of subsecond precision. Supported Signatures
Note: localtimestamp() is stable, i.e. might return a different value for a different query execution. ๐Ÿ”— Official Documentation

millisecond

Returns the millisecond of the second from x. Supported Signatures
๐Ÿ”— Official Documentation

minute

Returns the minute of the hour from x. Supported Signatures
๐Ÿ”— Official Documentation

month

Returns the month of the year from x. Examples:
examples.sql
Supported Signatures
๐Ÿ”— Official Documentation

now

This is an alias for current_timestamp. Examples:
examples.sql
Supported Signatures
Note: now() is stable, i.e. might return a different value for a different query execution. ๐Ÿ”— Official Documentation

quarter

Returns the quarter of the year from x. The value ranges from 1 to 4. Supported Signatures
๐Ÿ”— Official Documentation

second

Returns the second of the minute from x. Supported Signatures
๐Ÿ”— Official Documentation

to_unixtime

Returns timestamp as a UNIX timestamp. Examples:
examples.sql
Supported Signatures
๐Ÿ”— Official Documentation

year

Returns the year from x. Examples:
examples.sql
Supported Signatures
๐Ÿ”— Official Documentation