L
Leanne
I would like to use the following code to run on any day of current week and
return data for the previous week, Sun-Sat.
I found the SQL code but it doesn't work in Access. Is there any way to
tweak it so it will work and what would need to be changed?
where
-- Greater than or equal Sunday of last week
saledate >= dateadd(dd,((datediff(dd,-53684,getdate())-7)/7)*7,-53684) and
-- Less than Sunday of this week
saledate < dateadd(dd,(datediff(dd,-53684,getdate())/7)*7,-53684)
Thanks for any assistance offered.
LMR
return data for the previous week, Sun-Sat.
I found the SQL code but it doesn't work in Access. Is there any way to
tweak it so it will work and what would need to be changed?
where
-- Greater than or equal Sunday of last week
saledate >= dateadd(dd,((datediff(dd,-53684,getdate())-7)/7)*7,-53684) and
-- Less than Sunday of this week
saledate < dateadd(dd,(datediff(dd,-53684,getdate())/7)*7,-53684)
Thanks for any assistance offered.
LMR