WEEK_OF_MONTH_UDF

Definition

Defines in which week of the month a given date is.

PUBLIC.WEEK_OF_MONTH_UDF(INPUT TIMESTAMP_TZ)

Parameters

INPUT TIMESTAMP_TZ

The date to get which week of the month it belongs to.

Returns

A varchar that showcases the week of a month of the date.

Usage example

Input:

SELECT PUBLIC.WEEK_OF_MONTH_UDF(DATE '2021-10-26');

Output:

'4'

Last updated