开发者

LINQ - more than or equal to

开发者 https://www.devze.com 2023-01-01 21:43 出处:网络
Part of the code: ...where se.DateFrom >= pDateFrom && se.DateTo <= pDateTo select se...

Part of the code:

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

Does not work. T开发者_运维技巧here 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 :)


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

where se.DateFrom >= pDateFrom.Date && se.DateTo.Date <= pDateTo
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号