I am trying to set up a date range filter on my UI, with checkboxes to say whether a DateTimePicker\'s value should be used, e.g.
Dim fromDate As DateTime? =
Use New Date as a magic number:
New Date
Dim fromDate As New Date If fromDatePicker.Checked Then fromDate = fromDatePicker.Value End If If fromDate <> New Date Then list = list.Where(Function(i) i.InvDate.Value >= fromDate.Value) End If