DAYSDIFF_MXONB(A)
- 1 Minute to read
- Print
- DarkLight
- PDF
DAYSDIFF_MXONB(A)
- 1 Minute to read
- Print
- DarkLight
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Date Transform: DAYSDIFF_MXONB(A)
Returns the number of days between Date A and the maximum value of Date B
Purpose
Use this function to calculate:
- The number of days between a target date and a comparison date
- The number of days between one event and most recent occurrence of another event
- The age of a transaction in days relative to the total time covered by the data set
Return Value
Property | Value |
---|---|
FieldType | Integer |
FieldSize | med |
DataType | Discrete |
DataSize | Short |
Example Return Value: -N.....N
where
N is the maximum number of days between Date A and the maximum of Date B
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”: “DAYSDIFF_MXONB(A,B)” | DAYSDIFF_MXONB(A,B) |
A | “p2”: “DateTimeFieldName” “p2”: “DateFieldName” “p2”: “#YYYY-MM-DD HH:MM:SS” “p2”: “#YYYY-MM-DD” | Required. Date to subtract from B. Supports:
|
B | “p3”: “DateTimeFieldName” “p3”: “DateFieldName” “p3”: “#YYYY-MM-DD HH:MM:SS” “p3”: “#YYYY-MM-DD” | Required. Date from which to calculate the maximum Supports:
|
JSON Sample
Usage Notes
- ABSDAYSDIFF(A,B) - Absolute difference in days between dates A and B
- DAYSDIFF(A,B) - Difference in days between dates A and B
- DAYSBEFOREMAX(A) - Difference in days between A and MAX(A)
- DAYSAFTERMIN(A) - Difference in days between A and MIN(A)
Example
Example | Details |
---|---|
Description | Calculate days between transaction and most recent response in the system |
Input |
|
Sample |
Was this article helpful?