This may be a basic question, but is there a straightforward way to calculate the number of days that overlap between two date ranges?


An example of what I'm looking for is the Overlap variable below:

Event1_start Event1_end Event2_start Event2_end Overlap
01mar2020 30mar2020 15feb2020 5mar2020 5
01mar2020 30mar2020 01feb2020 29feb2020 0

Thanks so much for your help!