Today we’re featuring an article from mult-gold-medal winner of the T-SQL Guru competition, multi-winner of the MCC award, and TechNet Wiki Community Council member, Naomi N:
Thank you to Naomi for providing this great resource:
Here is an excerpt from the article:
I want to start with this simple question that was posted today (May 31, 2013) – how to find today’s date day number from the beginning of the year.
This is my solution and a bit of explanation at the end
= dateadd (
, @YearStart, @curDate) + 1
Thanks again to Naomi!
Check out the full article here:
– User Ed