The WEEK function returns the number of a week within the year from a specified date in YYYYMMDD format.
Category
Date / Time
Syntax
WEEK(date)
Parameter and Description
Parameter | Description |
---|---|
date | This parameter specifies a valid date in YYYYMMDD format. This date can be a field from a source datastore, a constant, a variable or the result of another Function. |
Example
Map the number of the week from source field SRC_DATE into target field WEEK_NUM. Assume that SRC_DATE contains the value 20020108.
WEEK_NUM = WEEK (SRC_DATE)
Returns the value of 2 and maps the result to the target field.