I need to get a list of nodes, based on 2 rules, both related to a date field (myDate in this example).
I currently have the following, that only takes one of the 2 rules, which is checking if the date field is empty;
var results = root.Descendants("myDocType")
.Where(x => !x.GetProperty("myDate").HasValue)
.OrderBy("myDate desc");
In the same Where clause, i need to check for:
- The date is empty OR
- The date is today or earlier (just the date, not the time of day)
So i basically need to add the last requirement to my Where clause. But how?