Here what I would like to do: var groups = from g in Group.All() where g.FirstDay < startDate && (g.LastDay == null || g.LastDay >= startDate)