sql根据当前日期计算星期【原】

 

Author:myssh

 select a as 星期, getdate() as 日期
 from(select a='星期一',b=1
  union all select '星期二',2 union all select '星期三',3
  union all select '星期四',4 union all select '星期五',5
  union all select '星期六',6 union all select '星期日',0
 )a where b = (datepart(weekday,getdate())-1)

posted on 2009-06-23 10:43  ToKens  阅读(654)  评论(0编辑  收藏  举报