Home Forums Article Discussions Article Discussions by Author Discuss content posted by Divya Agrawal Finding the Correct Weekday Regardless of DateFirst RE: Finding the Correct Weekday Regardless of DateFirst
Divya Agrawal
Hall of Fame
Points: 3144
More actions
February 19, 2010 at 2:19 am
#1121632
Yes Patrick. You can even do like
SELECT (DATEPART(dw, '2009-12-17') + @@DATEFIRST-1) % 7 AS dw
For Monday to be the first day..:)
Thanks Knut. I have cleared myself later on regarding the format 🙂
--Divya