SQL: 今天星期几
{ Posted on 星期四, 十一月 19, 2009
by Kaiser.XKw
}
SELECT CASE(datepart(dw, getdate())+ @@datefirst)%7
WHEN 2 THEN ''Monday''
WHEN 3 THEN ''Tuesday''
WHEN 4 THEN ''Wednesday''
WHEN 5 THEN ''Thursday''
WHEN 6 THEN ''Friday''
WHEN 0 THEN ''Saturday''
WHEN 1 THEN ''Sunday''
ELSE NULL
END
No Response to "SQL: 今天星期几"
发表评论