SyntaxFix
Write A Post
Hire A Developer
Questions
Check this out... its working fine.
declare @date as datetime = '2014-03-10' select DATEPART(week,@date) - DATEPART(week,cast(cast(year(@date) as varchar(4))+'-' + cast(month(@date) as varchar(2)) + '-01' as datetime))+1