Date Transform: WEEKDAY(A)
Returns the weekday from Date A as an integer from 1 to 7, where 1=Monday
Purpose
Use this function to:
- Create Date/Weekday mappings for use in mathematical formulas
- Group events into weekdays
Return Value
| Property | Value |
|---|---|
| FieldType | Integer |
| FieldSize | Low |
| DataType | Discrete |
| DataSize | Short |
Example Return Value: 1...7
Parameters
| Parameter | JSON | Description |
|---|---|---|
| Table | “targetTable”: “MyTableName” | The target table on which the new field will be created |
| Filter | “dataset”: {DataSet_JSON} | Optional. If a filter is applied, records not in the filter Recordset will be returned as null. |
| DateTimeFunction | “p1”: “WEEKDAY(A)” | WEEKDAY(A) |
| A | “p2”: “DateTimeFieldName” “p2”: “DateFieldName” “p2”: “#YYYY-MM-DD HH:MM:SS” “p2”: “#YYYY-MM-DD” | Required. The date from which to extract the weekday Supports:
|
JSON Sample
Usage Notes
See also:
- SWEEKDAY(A) - weekday as a string
- SMONTH(A) - month as a string
- WOY(A) - week of year
Example
| Example | Details |
|---|---|
| Description | Group transactions by weekday of shipment |
| Input |
|
| Sample |