- Documentation
- Activities
- Date & Time
- Subtract dates
Calculate the difference between two dates
Inputs
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
Start Date/Time startDateTime | expression | Required | — | — |
End Date/Time endDateTime | expression | Required | — | — |
Result Unit resultUnit | enum | Optional | days | —secondsminuteshoursdaysweeksmonthsyears |
Output Variable outputVariable | variable | Optional | DateDifference | — |
Output
$outputVariableObjectDifference between two dates
differenceNumberunitString
Compatibility
WindowsLinuxAttendedUnattended
Related activities
Add to datetime
Add days, months, or years to a date
Compare dates
Compare two dates to check if one is before, after, or equal to another
Convert timezone
Convert a date/time from one timezone to another
Format date
Convert a date to a formatted text string
Get current date and time
Get today's date and the current time
Get date part
Extract a specific part from a date (year, month, day, etc.)