aaaaa 2012-02-10
bbbbb 2012-02-11
ccccc 2012-02-12
dddddd 2012-02-13
我要查询 从 2012-02-10 到 2012-02-12
之间的数据
linq 语句怎么写呢?
5 个解决方案
#1
自己顶一下,等待中...
#2
(from i in table
where i.data>="2012-02-10"
where i.data<"2012-02-12"
select i).ToList();
#3
string 类型的可以这样比较?
#4
querys = (from m in hdong where Convert.ToDateTime(m.dates.Trim()).CompareTo(Convert.ToDateTime("2012-02-10")) >= 0 && Convert.ToDateTime(m.dates.Trim()).CompareTo(Convert.ToDateTime("2012-02-10")) <= 0 select m).ToList();
我找到办法了
我找到办法了
#5
var query=from q in db.test
where q.date>=DateTime.Parse('2012-02-10') && q.date<=DateTime.Parse('2012-02-13')
select q
#1
自己顶一下,等待中...
#2
(from i in table
where i.data>="2012-02-10"
where i.data<"2012-02-12"
select i).ToList();
#3
string 类型的可以这样比较?
#4
querys = (from m in hdong where Convert.ToDateTime(m.dates.Trim()).CompareTo(Convert.ToDateTime("2012-02-10")) >= 0 && Convert.ToDateTime(m.dates.Trim()).CompareTo(Convert.ToDateTime("2012-02-10")) <= 0 select m).ToList();
我找到办法了
我找到办法了
#5
var query=from q in db.test
where q.date>=DateTime.Parse('2012-02-10') && q.date<=DateTime.Parse('2012-02-13')
select q