用函数datepart处理就可以了,示例:select datepart(weekday,getdate()) as 周内的第几日select datepart(week,getdate()) as 年内的第几周select datepart(quarter,getdate()) as 年内的第几季