Date Transform: YEARMONTH(A)
Extract the year and month from Date A in the format YYYYMM
Purpose
Use this function to:
- Segment multi-year data into months
Return Value
| Property | Value |
|---|---|
| FieldType | Integer |
| FieldSize | Med |
| DataType | Discrete |
| DataSize | Short |
Example Return Value: 201905, 197409, 198112
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. |
| Date Function | “p1”: “YEARMONTH(A)” | YEARMONTH(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 year and month Supports:
|
JSON Sample
Usage Notes
See also:
- YEAR(A) - year in format YYYY
- YEARQTR(A) - year and quarter in format YYYYQ
- YEARWOY(A) - year and week of year, in format YYYYWW
Example
| Example | Details |
|---|---|
| Description | Create a year/month segment from transaction date |
| Input |
|
| Sample |