1👍
✅
That’s a math question. This query should do the trick:
date1 <= to_date and date2 >= from_date
Edit
The following django statement should give you the desired result:
SampleModel.objects.filter(to_date__gte=date1, from_date__lte=date2)
Source:stackexchange.com