Calculate time difference between dates
Calculates the time between two dates, broken down into years, months, days, hours, and minutes.
Common use cases
- Data manipulation Wrkflows
- Time management
Category
- Date & Time
Inputs (what you have)
| NAME | DESCRIPTION | TYPE | REQUIRED | EXAMPLE |
|---|---|---|---|---|
| Start date | In the YYYY-MM-DD HH:MM AM/PM format, provide the start date. | Date | Yes | 2022-01-25 2:30 PM |
| End date | In the YYYY-MM-DD HH:MM AM/PM format, provide the end date. | Date | Yes | 2022-12-03 4:00 PM |
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 section. These variables in the Data Library section are the outputs of previous Wrk Actions in the Wrkflow.
Outputs (what you get)
For the start and end dates above, the difference is 10 months, 8 days, 1 hour, and 30 minutes. Each output gives one part of that difference. For example, Difference in days gives the 8 days left after counting the 10 full months.
| NAME | DESCRIPTION | TYPE | REQUIRED | EXAMPLE |
|---|---|---|---|---|
| Difference in minutes | The number of minutes left after counting full hours. | Number | Yes | 30 |
| Difference in hours | The number of hours left after counting full days. | Number | Yes | 1 |
| Difference in days | The number of days left after counting full years and months. | Number | Yes | 8 |
| Difference in months | The number of months left after counting full years. | Number | Yes | 10 |
| Difference in years | The number of full years between the start and end dates. | Number | Yes | 0 |
Seconds are not included in the result.
Statuses
| NAME | DESCRIPTION |
|---|---|
| Success | This status is selected when the difference between two dates was successfully calculated. |
| Unsuccessful | This status is selected in the event of the following scenarios:- The start and/or end dates are not provided |
Requirements
- N/A