So on my page I have two date boxes where users can choose a from and to date. The problem is when I enter for example the below. I get items which actually have a date greater than 05/04/2012, which according to the below should not happen.
Basically what I am trying to achieve is
- If from date is entered then date >= from date
- if to date is entered then date <= to date
- if both are entered then date >= from date and date <= to date
This is happening because your
cl.claimStatus.Anywill returntrueif any of the items in theclaimStatuslist are less than 05/04/2012. Thus, your statement would look like the following:…thus returning everything.