Date Transform: ABSDAYSDIFF(A,B)
Returns absolute difference in days between 2 dates.
Purpose
Use this function to:
- Calculate the number of days between 2 dates
Return Value
| Property | Value |
|---|---|
| FieldType | Integer |
| FieldSize | Low / Med / High |
| DataType | Discrete |
| DataSize | Short / Integer |
Example Return Value: 0...N
where
N = maximum days difference between the 2 dates
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”: “ABSDAYSDIFF(A,B)” | ABSDAYSDIFF(A,B) |
| A | “p2”: “DateFieldLower” | Required. Valid Inputs: Date Field, DateTime Field The lower bound date field. The order in which date fields A and B are specified does not matter. |
| B | “p3”: “DateFieldHigher” | Required. Valid Inputs: Date Field, DateTime Field The upper bound date field. The order in which date fields A and B are specified does not matter. |
JSON Sample
Usage Notes
The order in which the date fields for parameters A and B are specified does not matter.
Example
| Example | Details |
|---|---|
| Description | Calculate number of days between this transaction and last transaction |
| Input |
|
| Sample |