Excerpt |
---|
Derives the numeric value for the day of the week (1 , 2 , etc.). Input must be a reference to a column containing Datetime values. |
Info |
---|
NOTE: If the source Datetime value does not include a valid input for this function, a missing value is returned. |
Tip |
---|
Tip: You can use the the DATEFORMAT function function to generate text versions of the day of the week. See Examples below. |
Column reference example:
d-codelang-syntax |
---|
RawWrangle | true |
---|
Type | ref |
---|
showNote | true |
---|
WrangleText | derive type:single value: |
---|
| WEEKDAY |
weekday(MyDate) |
Output:
...
Returns the numeric weekday values derived from
...
the MyDate
column.
d-codelang-syntax |
---|
RawWrangle | true |
---|
Type | syntax |
---|
showNote | true |
---|
WrangleText | derive type:single value: |
---|
| WEEKDAY |
weekday(datetime_col) |
Argument | Required? | Data Type | Description |
---|
datetime_col | Y | datetime | Name of column whose weekday values are to be computed |
datetime_col
...
- Missing values for this function in the source data result in missing values in the output.
- Multiple columns and wildcards are not supported.
Tip |
---|
Tip: You cannot insert constant Datetime values as inputs to this function. However, you can use the following: WEEKDAY(DATE(12,20,2017)) . |
Required? | Data Type | Example Value |
---|
Yes | Datetime | myDate |
...