SELECT CountDate=CONVERT(CHAR(10),DATEADD(DAY,0-rn,GETDATE()),20) FROM (SELECT TOP 7 rn=row_number() OVER(ORDER BY GETDATE())-1 FROM sysobjects)t ORDER BY CountDate
结果如下图
时间: 2024-12-29 01:33:39
SELECT CountDate=CONVERT(CHAR(10),DATEADD(DAY,0-rn,GETDATE()),20) FROM (SELECT TOP 7 rn=row_number() OVER(ORDER BY GETDATE())-1 FROM sysobjects)t ORDER BY CountDate
结果如下图