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)
| NAME | DESCRIPTION | TYPE | REQUIRED | EXAMPLE |
|---|---|---|---|---|
| Value type | Choose whether to calculate using a date or a date & time. Accepted values: Date, Date & Time. Defaults to Date. | PredefinedChoice List | No | Date |
| Reference date | The date on which the calculation is based. Shown when Value type is Date. | Date | Yes (Date mode) | 2022-05-25 |
| Reference date & time | The date and time on which the calculation is based. Shown when Value type is Date & Time. | Date & Time | Yes (Date & Time mode) | 2024-01-15T10:00:00Z |
| Operation | The operation to be performed. Accepted values: Add, Subtract | PredefinedChoice List | Yes | Add |
| Years | Years to be added or subtracted from the reference value | Integer | No | 2 |
| Months | Months to be added or subtracted from the reference value | Integer | No | 3 |
| Weeks | Weeks to be added or subtracted from the reference value | Integer | No | 1 |
| Days | Days to be added or subtracted from the reference value | Integer | No | 1 |
| Hours | Hours to be added or subtracted. Shown when Value type is Date & Time. | Integer | No | 2 |
| Minutes | Minutes to be added or subtracted. Shown when Value type is Date & Time. | Integer | No | 30 |
| Seconds | Seconds to be added or subtracted. Shown when Value type is Date & Time. | Integer | No | 15 |
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)
| NAME | DESCRIPTION | TYPE | REQUIRED | EXAMPLE |
|---|---|---|---|---|
| Result weekday | The result weekday based on calculation | Text | Yes | Monday |
| Result date | The result date based on calculation | Date | Yes | 2024-08-26 |
| Result date & time | The result date and time. Populated when Value type is Date & Time. | Date & Time | No | 2024-01-15T12:30:00Z |
Outcomes
| NAME | DESCRIPTION |
|---|---|
| Success | This status is selected if the date or date & time was correctly calculated. |
| Unsuccessful | This 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.