且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在数据库中显示特定日期的详细信息

更新时间:2023-01-27 18:01:28

您也可以尝试以下语句:


you can also tried below statement:


select * from table where Date between dateadd(DD,-7,getdate()) and getdate()


可以尝试以下查询

Could try the following query

select * from table where Date between DATEADD(DD, -7, SYSDATETIME()) AND SYSDATETIME()