当天
[code]var lst = db.Queryable<CLASS>(\"t\").Where(\"TRUNC(t.TIME) = TRUNC(SYSDATE)\").ToList();
本周
[code]var lst = db.Queryable<CLASS>(\"t\").Where(\"to_char(t.time,\'yyyyiw\')=to_char(sysdate,\'yyyyiw\')\").ToList();
昨天
[code]var lst = db.Queryable<CLASS>(\"t\").Where(\"TRUNC(t.TIME) = TRUNC(SYSDATE-1)\").ToList();
上周
[code] var lst = db.Queryable<CLASS>(\"t\").Where(\"t.time >= TRUNC(NEXT_DAY(SYSDATE-8,1)-6) AND time < TRUNC(NEXT_DAY(SYSDATE-8,1)+1)\").ToList();
时间段
[code]string sql = string.Format(\"t.time >= to_date(\'{0}\',\'yyyymmdd\') and t.time < to_date(\'{1}\',\'yyyymmdd\') +1\", strStartTime, strEndTime);var lst = db.Queryable<CLASS>(\"t\").Where(sql).ToList();