REFERENCE
Date Functions
A list of available functions to perform calculations on dates and timestamps.
Functions
Section titled “Functions”day(date:)
Section titled “day(date:)”Extracts the day of the month from a date value (1-31).
day(date: DATE) -> INTEGER
day_of_week(date:)
Section titled “day_of_week(date:)”Returns the day of the week from a date (1-7, where 1 is Monday).
day_of_week(date: DATE) -> INTEGER
day_of_year(date:)
Section titled “day_of_year(date:)”Day of the year (starts from 1, i.e., January 1 = 1).
day_of_year(date: DATE) -> INTEGER
hour(date:)
Section titled “hour(date:)”Extracts the hour from a date/time value (0-23).
hour(date: DATE) -> INTEGER
microsecond(date:)
Section titled “microsecond(date:)”Extracts the microsecond from a date/time value (0-999999).
microsecond(date: DATE) -> INTEGER
millisecond(date:)
Section titled “millisecond(date:)”Extracts the millisecond from a date/time value (0-999).
millisecond(date: DATE) -> INTEGER
minute(date:)
Section titled “minute(date:)”Extracts the minute from a date/time value (0-59).
minute(date: DATE) -> INTEGER
month(date:)
Section titled “month(date:)”Extracts the month from a date value (1-12).
month(date: DATE) -> INTEGER
quarter(date:)
Section titled “quarter(date:)”Extracts the quarter from a date value (1-4).
quarter(date: DATE) -> INTEGER
second(date:)
Section titled “second(date:)”Extracts the second from a date/time value (0-59).
second(date: DATE) -> INTEGER
timezone_hour(date:)
Section titled “timezone_hour(date:)”Extracts the timezone hour from a timestamp with timezone.
timezone_hour(date: DATE) -> INTEGER
timezone_minute(date:)
Section titled “timezone_minute(date:)”Extracts the timezone minute from a timestamp with timezone.
timezone_minute(date: DATE) -> INTEGER
week(date:)
Section titled “week(date:)”Returns the week number from a date (1-53).
week(date: DATE) -> INTEGER
year(date:)
Section titled “year(date:)”Extracts the year from a date value.
year(date: DATE) -> INTEGER