调试时,这3个 DateTime 类型的传入值为:
CreatedDate = 2/3/2012 3:11:34 PM
d1 = 1/1/2012 12:00:00 AM
d2 = 2/3/2012 12:00:00 AM
listings = listings.Where(d=>d.CreatedDate >= d1.Date && d.CreatedDate <= d2.Date);
我在listing var中有数据,直到这个表达式之后;关于他们为什么没有出现的任何线索?
答案 0 :(得分:4)
d2.Date不大于d.CreatedDate
答案 1 :(得分:0)
试试这个
Get<Collection>()
.Where(
x => x.ModifiedInfo.Peek().DateCreated >= DateTime.Parse("2016-11-11")
&& x.ModifiedInfo.Peek().DateCreated <= DateTime.Parse("2016-11-16") )
.Dump();