SELECT CONVERT(VARCHAR(10), DATEADD(DD, number, DATENAME(YY, '${年}'+'0101')+DATENAME(MM, '${年}'+'0101')+'01'), 23) 日期, DATENAME(DW,CONVERT(VARCHAR(10), DATEADD(DD, number, DATENAME(YY, '${年}'+'0101')+DATENAME(MM, '${年}'+'0101')+'01'), 23)) 星期 FROM master..spt_values WHERE type='p' AND number<DAY(DATEADD(MM, 1, '${年}'+'0101')-DAY('${年}'+'0101')) |
最佳回答 |
||||
0
|
|
|||
0
|
|
|||
0
|
|
|||
0
|
|
|||
0
|
|
|||
0
|
|
|||
0
|
|
|||
0
|
|
|||
0
|
|
|||
0
|
|