Correct me if I am wrong, but in the mikemurf22 example, will he need to check every part of the date component and maybe a lot more server processing?
Anyway, I came across this problem and this is my solution.
Assuming that you are only going to pass the date component, you can find the last minute of the day that you are going through and use the where clause to determine the range.
public List<Log> GetLoggingData(DateTime LogDate, string title) { DateTime enddate = new DateTime(LogDate.Year, LogDate.Month, LogDate.Day, 23, 59, 59) var query = from t in context.Logs where t.Timestamp >= date where t.Timestamp <= enddate select t; return query.ToList(); }
Mike Oct 03 '11 at 13:41 2011-10-03 13:41
source share