Home Forums SQL Server 2005 T-SQL (SS2K5) Obtaining year and week numbers from a date in SQL RE: Obtaining year and week numbers from a date in SQL

  • If you want a whole bunch of them, you should consider making use of this date function...

    http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=61519

    select DATE, ISO_YEAR_WEEK_NO from dbo.F_TABLE_DATE('1/1/2008', '1/1/2009')

    Better still, use that function to create a permanent, fully-indexed table, and then use that.

    Ryan Randall

    Solutions are easy. Understanding the problem, now, that's the hard part.