seajoker
Say Hey Kid
Points: 700
More actions
May 27, 2008 at 2:38 pm
#207754
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?
Steve Jones - SSC Editor
SSC Guru
Points: 736252
May 27, 2008 at 3:02 pm
#820854
Change the getdate to dateadd(yyy, -1, getdate()
May 28, 2008 at 10:58 am
#821331
Thanks for the help, it works as I need it to.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply