select dateadd(week, datediff(week,0,CONVERT(DATETIME,GETDATE(),120)-1),0) SELECT CONVERT(Varchar(100),DATEADD(DAY, 6, DATEADD(wk, DATEDIFF(wk,0,getdate()),0)),120)
时间: 2024-10-08 23:42:10
select dateadd(week, datediff(week,0,CONVERT(DATETIME,GETDATE(),120)-1),0) SELECT CONVERT(Varchar(100),DATEADD(DAY, 6, DATEADD(wk, DATEDIFF(wk,0,getdate()),0)),120)