ABSDAYSDIFF(A,B)
  • 1 Minute to read
  • Dark
    Light
  • PDF

ABSDAYSDIFF(A,B)

  • Dark
    Light
  • PDF

Article summary

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

PropertyValue
FieldTypeInteger
FieldSizeLow / Med / High 
DataTypeDiscrete
DataSizeShort / Integer


Example Return Value: 0...N
where
N = maximum days difference between the 2 dates

Parameters

ParameterJSONDescription
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


ExampleDetails
DescriptionCalculate number of days between this transaction and last transaction
Input
  • Table: = [transactions]
  • Function: = DateTransform
  • DateTimeFunction: = ABSDAYSDIFF(A,B)
  • A:= [transactions].[last_response]
  • B: = [transactions].[first_transaction] 
  • Name: = AgeOfTransaction
Sample

Was this article helpful?

What's Next