I guess you only need to get a hint of the implementation, so i come up with this simplified version.
in this example, the assumptions are:
- date format: MM/DD/YYYY
- semi-close range of the date [start, end) - do not include the end date
CalculateDuration.rp (47.2 KB)