Hello guys,

I have a timetabling system and I need to find a way to find x number of days where there are no appointments for a given person. For example, say person A wants to take a 5 day holiday but they need to first see if there are five consecutive days where they have no appointments in the database, the person could enter the number of days and the code would presumably load all of their appointment dates (connect to database and query using SQL) and use some sort of search to find if indeed there are some days free.

If anyone has any code or advice on this it would be greatly appreciated.

Best,
Ozos