Skip to main content

Calculate date / date & time

Calculates a date or date & time by adding or subtracting from a reference value.

Common use cases

  • Data manipulation

Category

  • Date & Time

Inputs (what you have)

NAMEDESCRIPTIONTYPEREQUIREDEXAMPLE
Value typeChoose whether to calculate using a date or a date & time. Accepted values: Date, Date & Time. Defaults to Date.PredefinedChoice ListNoDate
Reference dateThe date on which the calculation is based. Shown when Value type is Date.DateYes (Date mode)2022-05-25
Reference date & timeThe date and time on which the calculation is based. Shown when Value type is Date & Time.Date & TimeYes (Date & Time mode)2024-01-15T10:00:00Z
OperationThe operation to be performed. Accepted values: Add, SubtractPredefinedChoice ListYesAdd
YearsYears to be added or subtracted from the reference valueIntegerNo2
MonthsMonths to be added or subtracted from the reference valueIntegerNo3
WeeksWeeks to be added or subtracted from the reference valueIntegerNo1
DaysDays to be added or subtracted from the reference valueIntegerNo1
HoursHours to be added or subtracted. Shown when Value type is Date & Time.IntegerNo2
MinutesMinutes to be added or subtracted. Shown when Value type is Date & Time.IntegerNo30
SecondsSeconds to be added or subtracted. Shown when Value type is Date & Time.IntegerNo15

Note: the value of inputs can either be a set value in the configuration of the Wrk Action within the Wrkflow, or a variable from the Data Library. These variables in the Data Library section are the outputs of previous Wrk Actions in the Wrkflow.

Outputs (what you get)

NAMEDESCRIPTIONTYPEREQUIREDEXAMPLE
Result weekdayThe result weekday based on calculationTextYesMonday
Result dateThe result date based on calculationDateYes2024-08-26
Result date & timeThe result date and time. Populated when Value type is Date & Time.Date & TimeNo2024-01-15T12:30:00Z

Outcomes

NAMEDESCRIPTION
SuccessThis status is selected if the date or date & time was correctly calculated.
UnsuccessfulThis status is selected in the event of the following scenarios: the instructions cannot be followed, or required inputs were left blank.

Requirements

  • N/A

How it works

  • Value type: Date, Reference date: January 13, 2022, Days: 6 → Result weekday Wednesday, Result date 2022-01-19.
  • Value type: Date & Time, Reference date & time: 2024-01-15T10:00:00Z, Hours: 2, Minutes: 30 → Result date & time 2024-01-15T12:30:00Z.