当天时间查询例子
查询当前时间,在后台的处理程序是在:当天时间上加一天作为结束的查询时间,例如 2012-07-01:00:00 到 2012-07-02:00:00 ,stockOutTo.Value.AddDays(1)
//Stock-in-from var stockOutFrom = GetFormatDate(this.txtSearchStockOutFrom.Text.Trim()); if (stockOutFrom != null) { list = list.Where(c => c.Created >= stockOutFrom); } //Stock-in-to var stockOutTo = GetFormatDate(this.txtSearchStockOutFrom.Text.Trim()); if (stockOutTo != null) { list = list.Where(c => c.Created <= stockOutTo.Value.AddDays(1)); }