已知日期算星期幾

sql:方法

select rq, case datepart(weekday, rq)
when 1 then
'星期天'
when 2 then
'星期一'
when 3 then
'星期二'
when 4 then
'星期三'
when 5 then
'星期四'
when 6 then
'星期五'
when 7 then
'星期六'
end from 表名

 

mysq:方法

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章