SelectPeriodOnDates function

Select a period on Dates