Viewing post 1 (of 1 total)
Thanks for saving me from writing it from scratch, Divya!
@davidgr144
David, I spotted your question too, and modified the query to always give me Mon=1 to Sun=7:
select 1+(datepart(dw, @date)+@@datefirst+5)%7
Adding...
April 28, 2011 at 6:50 am
#1317213