I am not 100% clarifying your requirements. In your start line, you requested records "where the range of input dates is between the two date fields", but in the "Advanced" line, you mean that you do not want to return records where the start date of the meeting is not equal to the end date of the input. I believe these are two different requirements, so I will give you two different requests.
First request:
from t1 in db.Appointments where date1 >= t1.AppointmentStart where date2 <= t1.AppointmentEnd select t1;
Second request:
from t1 in db.Appointments where date2 > t1.AppointmentStart where date1 < t1.AppointmentEnd select t1;
The first query returns records that βcontainβ the input dates.
The second query returns records that "overlap" the input date.
I think it makes sense that you want the overlap request, and this one will match your "14:00 - 15:00", does not return a value for the request 15: 00-16: 00 ".
Let me know if I made a mistake understanding your requirements and you need to make any changes.
source share