【发布时间】:2019-11-18 23:25:23
【问题描述】:
我有一份报告,我想在 3 天内显示数据,即当用户运行报告时,它应该显示昨天、今天和明天的数据。
Where [tasSched].[CurrReqstDate] Between *yesterday today and tomorrow*
【问题讨论】:
我有一份报告,我想在 3 天内显示数据,即当用户运行报告时,它应该显示昨天、今天和明天的数据。
Where [tasSched].[CurrReqstDate] Between *yesterday today and tomorrow*
【问题讨论】:
如果您使用SQL Server,您可以使用以下查询来获取昨天和明天之间的数据。
WHERE [tasSched].[CurrReqstDate] between DATEADD(DAY, -1,GETDATE())
and DATEADD(DAY, +1,GETDATE())
【讨论】: