tags:

views:

93

answers:

1

Part of the code:

...where se.DateFrom >= pDateFrom && se.DateTo <= pDateTo select se...

Does not work. There is no any error but the To and From days do not get returned.

How do I query "more than or equal to" and "less than or equal to"?

Thanks :)

+2  A: 

Do your "dates" potentially contain a time element? If so, try something like this:

where se.DateFrom >= pDateFrom.Date && se.DateTo.Date <= pDateTo
LukeH
Yes, they are of type DateTime?
trnTash
It works! Thanks!
trnTash
trnTash