Home Forums SQL Server 2012 SQL Server 2012 - T-SQL BETWEEN alternative RE: BETWEEN alternative
jesse_hutchens
SSC Enthusiast
Points: 106
More actions
July 31, 2015 at 3:44 pm
#1816578
I agree with GilaMonster ... DateValue >= @StartDate and DateValue < dateadd(Day,1,@EndDate). If @startDate = '07/01/2015' and @endDate = '07/30/2015' you get all of the end date, including time: 7/30/2015 at 9pm will be returned.