I\'m trying to create a report that gets records from a SQL Server database where the delivery date is today.
I\'ve tried
select * from (tablename)
where
I'd just create 2 params. One for StartTime
and one for EndTime
and use those in my query.
DECLARE @StartTime DATETIME,
@EndTime DATETIME
SET @StartTime = DATEDIFF(d,0,GETDATE())
SET @EndTime = DATEADD(d,1,@StartTime)
SELECT *
FROM [tablename]
WHERE delivery_date >= @StartTime
AND delivery_date < @EndTime