SQL:获取中文周几

 1 declare @week nvarchar(2) = 
 2     case DatePart(DW, GetDate())
 3         when 1 then '周日'
 4         when 2 then '周一'
 5         when 3 then '周二'
 6         when 4 then '周三'
 7         when 5 then '周四'
 8         when 6 then '周五'
 9         when 7 then '周六'
10     end

 

你可能感兴趣的:(sql)