I'm not sure why I'm having such trouble here. Last 7 days this year is no problem, but now I need those same days for last year; the caveat being that they must be the same Days of the Week, so they are comparable.
If Yesterday = Wednesday of Week 38, then for Last Year I will need Wednesday of Week 38 minus 8 days.
I'm able to get Yesterday of Last Year fine:
Now I need that minus 8.
If Yesterday = Wednesday of Week 38, then for Last Year I will need Wednesday of Week 38 minus 8 days.
I'm able to get Yesterday of Last Year fine:
Code:
SELECT DATE_ID
FROM CALDATE
WHERE (((DatePart("w",[DATE_ID]))=DatePart("w",Date()-1)) AND ((DatePart("ww",[DATE_ID]))=DatePart("ww",Date()-1)) AND ((Year([DATE_ID]))=Year(Date())-1))
GROUP BY DATE_ID;
Now I need that minus 8.