DATE_DIFF
Creates a new column containing the difference between two dates.
Parameters
-
sourceColumn1
– The name of an existing column. -
sourceColumn2
– The name of an existing column. -
value1
– A character string to evaluate. -
value2
– A character string to evaluate. -
units
– A unit of measure for describe the difference between the dates. Valid values areMONTHS
,YEARS
,MILLISECONDS
,QUARTERS
,HOURS
,MICROSECONDS
,WEEKS
,SECONDS
,DAYS
, andMINUTES
. -
targetColumn
– A name for the newly created column.
Note
You can only specify one of the following combinations:
-
Both of
sourceColumn1
andsourceColumn2
. -
One of
sourceColumn1
orsourceColumn2
and one ofvalue1
orvalue2
. -
Both of
value1
andvalue2
.
Example
{ "RecipeAction": { "Operation": "DATE_DIFF", "Parameters": { "value1": "2020-01-01", "value2": "2020-10-06", "units": "DAYS", "targetColumn": "DATEDIFF Column 1" } } }