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