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
RyanRandall
SSChampion
Points: 13623
More actions
May 14, 2008 at 10:06 am
#815361
select ltrim(year('01/01/2008')) + right('0' + ltrim(datepart(week, '01/01/2008')), 2)
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.