May 27, 2008 at 2:38 pm
I have this where clause:
where sales.fld_posting_date between DATEADD(wk, DATEDIFF(wk,0,getdate()-7), 0) and (DATEADD(wk, DATEDIFF(wk,0,getdate()), 0) -1)
I need to get this same week from last year.
Any help would be appreciated?
seajoker
May 27, 2008 at 3:02 pm
Change the getdate to dateadd(yyy, -1, getdate()
May 28, 2008 at 10:58 am
Thanks for the help, it works as I need it to.
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy