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

MAX(A,B)

  • Dark
    Light
  • PDF

Article summary

Date Transform: MAX(A,B)

Returns which ever date is the most recent between A and B

Purpose

Use this function to:
  • Identify which of two events occurred most recently

Return Value

PropertyValue
FieldTypeDate
FieldSize
DataTypeDiscrete
DataSizeShort


Example Return Value:  2012-01-05

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”: “MAX(A,B)”MAX(A,B)
A“p2”: “DateTimeFieldName”
“p2”: “DateFieldName”
“p2”: “#YYYY-MM-DD HH:MM:SS”
“p2”: “#YYYY-MM-DD”
Required. Date formatted data.
Supports:  
  • DataType: Discrete / Continuous
  • Field Type: Date, DateTime
  • Fixed Value:  #YYYY-MM-DD,    e.g. #2021-04-05
  • Fixed Value:  #YYYY-MM-DD HH:MM:SS,    e.g. #2021-04-05 11:01:08
B“p3”: “DateTimeFieldName”
“p3”: “DateFieldName”
“p3”: “#YYYY-MM-DD HH:MM:SS”
“p3”: “#YYYY-MM-DD”
Required. Date formatted data.
Supports:  
  • DataType: Discrete / Continuous
  • Field Type: Date, DateTime
  • Fixed Value:  #YYYY-MM-DD,    e.g. #2021-04-05
  • Fixed Value:  #YYYY-MM-DD HH:MM:SS,    e.g. #2021-04-05 11:01:08

JSON Sample

Usage Notes

See also MIN(A)

Example

ExampleDetails
DescriptionSelect the most recent of two dates
Input
  • Table: = [transactions]
  • Function: = DateTransform
  • DateTimeFunction: = MAX(A,B)
  • A:= [transactions].[dtShipping]
  • B: = [transactions].[dtPurchase] 
  • Name: =MostRecent
Sample



Was this article helpful?

What's Next