比较通用列表中的DateTime

时间:2013-10-01 04:01:12

标签: c# generic-list

我正在尝试使用以下代码查询通用列表。

    ArticleStartDate = Convert.ToDateTime("2013-05-07 09:00:00.450");
    var queryable = context.GetQueryable<FeaturedArticleResultItem>()
    queryable = queryable.Where(t => t.StartDisplay > ArticleStartDate).OrderBy(t => t.StartDisplay);

我希望得到的结果是在5月7日上午9点之后有一个'StartDisplay'日期时间,我的查询会在当天晚些时候(第7天,这很好)返回项目列表,但是,我我们还在5月7日上午8:30之前获得了列表中的项目。看起来它比较日期好,但不是时间......

希望以上有意义。

更多信息,我发现 t.StartDisplay 看起来像这样{7/05/2013 1:31:00 a.m.}。比较时间时有关系吗?

0 个答案:

没有答案