Page tree

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

D toc

Derives the numeric value for the week within the year (1, 2, etc.). Input must be the output of the DATE function or a reference to a column containing Datetime values. The output of this function increments on Sunday.


NOTE: If the source Datetime value does not include a valid input for this function, a missing value is returned.

D s

Column reference example:

D code

derive type:single value:WEEKNUM(MyDate)

Output: Generates a column of values containing the numeric week number values derived from the MyDate column.

D s

D code

derive type:single value:WEEKNUM(datetime_col)

ArgumentRequired?Data TypeDescription
datetime_colYdatetimeName of column whose week number values are to be computed

D s lang notes


Name of the column whose week number value is to be computed.

  • Missing values for this function in the source data result in missing values in the output.
  • Multiple columns and wildcards are not supported.

Tip: You cannot insert constant Datetime values as inputs to this function. However, you can use the following: WEEKNUM(DATE(2017,12,20)).

D s

Required?Data TypeExample Value

D s

Example - Day of Date functions

Include Page
EXAMPLE - Day of Functions
EXAMPLE - Day of Functions

D s also