Trying to get only Thursdays of 1 year back
using (var context = new Context1()) { // Get 1 year back only Thursday var oneYearEarlier = DateTime
This is a clever solution using EntityFunctions.DiffDays
from his post:
DateTime firstSunday = new DateTime(1753, 1, 7); var bookings = from b in this.db.Bookings where EntityFunctions.DiffDays(firstSunday, b.StartDateTime) % 7 == 1 select b;