What do you mean with Retrieve?
Do you have these dates stored in the database, or do you want to determine all the dates between to given dates?
In the last scenario, what is your goal?
You don’t want to retrieve the dates, but you want to compare.
You can do this by executing a retrieve which retrieves all rental contracts within the requested dates.
Source: From database
Xpath: [StartDate < $NewRequest/EndDate and EndDate > $NewRequest/StartDate]
After retrieve, check if resulting variable contains a result. $ExistingRentalPeriod = empty
If true, then no other retal period exists, if false, it does