Date Transform: DADD(A,B)
Returns the date created when adding B days to Date A
Purpose
Use this function to:
- Create new date fields according to mathematical rules
- Create dates that are a specified number of days before or after a source date
Return Value
| Property | Value |
|---|---|
| FieldType | Date |
| FieldSize | Med |
| DataType | Short |
| DataSize | Discrete |
Example Return Value: 2021-01-05
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”: “DADD(A,B)” | DADD(A,B) |
| A | “p2”: “DateFieldName” “p2”: “#YYYY-MM-DD" | Required. Supports:
|
| B | “p3”: “IntegerFieldName” “p3”: “#DAYS” | Required. Supports:
|
JSON Sample
Usage Notes
To increase or decrease date by a fixed amount, use the #INTERVAL notation for B: #7, #-8
To increase or decrease by a row specific amount, use a field for B.
DateTime fields will be turned into Date Fields.
Example
| Example | Details |
|---|---|
| Description | Calculate date 1 week after shipping |
| Input |
|
| Sample |