首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > .NET >

linq to entity 时间格式转换有关问题

2013-04-20 
linq to entity 时间格式转换问题query query.Where(_ _.CreateTime startTime)startTime格式为

linq to entity 时间格式转换问题


query = query.Where(_ => _.CreateTime >= startTime);


startTime格式为 2013-04-08
CreateTime格式为 2013-04-08 00:00:00

怎么在查询时,输入startTime查询大于等于出该日期的数据。谢谢 LINQ entity
[解决办法]
CreateTime属性是日期型
startTime变量也是日期型
这样就不用担心格式问题,系统自动会比较的

热点排行