Skip to main content

Date Calculator

Add or Subtract time from a date.

Add or subtract time from a date.

Parameters​

NameDescriptionAccepted ValuesDefaultRequired
I/O
inputName of the dates column.string—Yes
outputName of the output column of dates.string, nullnullNo
Options
operationDate operation.string; one of:
  • add
  • subtract
"add"No
time_unitTime unit for operation.string, null; one of:
  • years
  • months
  • weeks
  • days
  • hours
  • minutes
  • seconds
  • milliseconds
nullNo
time_valueTime unit value for operation.number, nullnullNo
Conditions
ifCondition that determines whether the wrangle runs as a whole. Recipe variables may be referenced with ${variable}.string—No
whereFilter rows before applying the wrangle using SQL-like criteria, such as column1 = 123 OR column2 = 'abc'.string—No
where_paramsValues used with where for parameterized criteria. Uses SQLite placeholder syntax such as ? or :name.array, object—No

Examples​

wrangles:
- date_calculator:
input: Date
output: New Date
operation: subtract # Optional default is addition
time_unit: days
time_value: 1
Date
2022-12-26
New Date
2022-12-25
Access
RequirementValue
AI-poweredNo
Requires WrangleWorks accountNo
Requires subscriptionNo
Requires external API keyNo
Technical details
FieldValue
Catalog ID75
Catalog keydate_calculator
Recipe keydate_calculator
Catalog statusactive
Lifecycle statusactive
Recipe Writer eligibleYes
NamespaceRoot-level
Documentation groupdate
AliasesNone
Runtime symbolwrangles.recipe_wrangles.main.date_calculator
Legacy UUID19cfeb4f-02af-4ab2-895c-0ff2bb5cce19

Sources