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

DADD(A,B)

  • Dark
    Light
  • PDF

Article summary

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

PropertyValue
FieldTypeDate 
FieldSizeMed
DataTypeShort
DataSizeDiscrete


Example Return Value: 2021-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”: “DADD(A,B)”DADD(A,B)
A“p2”: “DateFieldName”
“p2”: “#YYYY-MM-DD"
Required.
Supports:  
  • DataType: Discrete / Continuous
  • Field Type: Integer, LongInteger 
  • Fixed Value:  #YYYY-MM-DD,    e.g. #2021-04-05
B“p3”: “IntegerFieldName”
“p3”: “#DAYS”
Required.
Supports:  
  • DataType: Discrete / Continuous
  • Field Type: Integer, LongInteger 
  • Fixed Value.  #INTERVAL    e.g. #7

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

ExampleDetails
DescriptionCalculate date 1 week after shipping
Input
  • Table: = [transactions]
  • Function: = DateTransform
  • DateTimeFunction: = DADD(A,B)
  • A:= [transactions].[dtShipping]
  • B: = #7
  • Name: =weekaftershipping
Sample



Was this article helpful?

What's Next