Hello navic
Thanks for your reply. I guess my question was not that clear, let me put it once again.
Requirement is:
Example Case1) To find range of dates, that have maximum overlap.
>> There are two date ranges that satisfy overlap condition, dates "15-Apr to 31-May" & "1-Aug to 2-Aug" have maximum overlapping i.e. 4 each
>> In case there are more than one range with max overlapping period, than overlapping period with max duration should be the ans.
>> Like in this Case 1, Answer should be "15-Apr to 31-May"
Example Case2) To find range of dates, that have maximum overlap.
>> There is only one range that satisfy overlap condition, dates "1-Aug to 2-Aug" i.e. 5
>> Like in this Case 2, Answer should be "1-Aug to 2-Aug"
Hope i have added some more clarity to the problem statement.
--
Rajan