Skip to content
REFERENCE

Date Functions

A list of available functions to perform calculations on dates and timestamps.


Extracts the day of the month from a date value (1-31).

day(date: DATE) -> INTEGER

Returns the day of the week from a date (1-7, where 1 is Monday).

day_of_week(date: DATE) -> INTEGER

Day of the year (starts from 1, i.e., January 1 = 1).

day_of_year(date: DATE) -> INTEGER

Extracts the hour from a date/time value (0-23).

hour(date: DATE) -> INTEGER

Extracts the microsecond from a date/time value (0-999999).

microsecond(date: DATE) -> INTEGER

Extracts the millisecond from a date/time value (0-999).

millisecond(date: DATE) -> INTEGER

Extracts the minute from a date/time value (0-59).

minute(date: DATE) -> INTEGER

Extracts the month from a date value (1-12).

month(date: DATE) -> INTEGER

Extracts the quarter from a date value (1-4).

quarter(date: DATE) -> INTEGER

Extracts the second from a date/time value (0-59).

second(date: DATE) -> INTEGER

Extracts the timezone hour from a timestamp with timezone.

timezone_hour(date: DATE) -> INTEGER

Extracts the timezone minute from a timestamp with timezone.

timezone_minute(date: DATE) -> INTEGER

Returns the week number from a date (1-53).

week(date: DATE) -> INTEGER

Extracts the year from a date value.

year(date: DATE) -> INTEGER