linq动态查询中日期查询的问题
用linq的动态查询,代码如下
searchsql = "MembersRegisterTime>=2008-9-6";
var query = db.VOrderMaxsid.Where(searchsql).Select("new(MembersMobile)");
报错说Operator '>=' incompatible with operand types 'DateTime?' and 'Int32'
我应该怎么拼接这个serchsql条件字符串中的日期呢?
------解决方案--------------------
------解决方案--------------------
searchsql = "MembersRegisterTime<=DateTime(2009,08,06)"