指定日期是当月的第几周
declare @date datetime; set @date = getdate() --思路,指定日期是当年的第几周-给定日期所在月第一天是当年的第几周 select datepart(week,@date)-datepart(week,dateadd(month,datediff(month,0,@date),0))+1 [week_month] select datepart(week,@date)-datepart(week,dateadd(day,1-datepart(day,@date),@date))+1 [week_month]