日期:2014-05-18 浏览次数:20474 次
SELECT DATEADD(DAY,NUMBER,'2009-1-1'),DATENAME(DW,DATEADD(DAY,NUMBER,'2009-1-1')) FROM MASTER..SPT_VALUES WHERE TYPE='P' AND YEAR(DATEADD(DAY,NUMBER,'2009-1-1'))=2009 AND DATEPART(DW,DATEADD(DAY,NUMBER,'2009-1-1')) >1 AND DATEPART(DW,DATEADD(DAY,NUMBER,'2009-1-1')) <7