我正在使用 SQL Server 2008 R2。我需要获得周日 weekno 并且我已经有查询,但它显示了错误的数据。我能做些什么 ?
它显示 2 而不是 1。例如,06-Jan-2013(WeekNo - 1)
我的查询是
SELECT DATEPART (week, '01-13-2013 23:59:59.000' ) As WeekNo1 ,
DATEPART (week, '01-06-2013 23:59:59.000' ) As WeekNo2 ,
DATEPART (week, '12-30-2012 23:59:59.000' ) As WeekNo3 ,
DATEPART (week, '12-23-2012 23:59:59.000' ) As WeekNo4 ,
DATEPART (week, '12-16-2012 23:59:59.000' ) As WeekNo5 ,
DATEPART (week, '12-09-2012 23:59:59.000' ) As WeekNo6