• One of the habits that I have developed, especially while developing date driven reports is to add this code to every stored procedure that I create:

    --Include the entire End Date (Set time to 11:59)

     Select @EndDate = DateAdd(d, 1,@EndDate)

     Select @Enddate = cast(convert(varchar, @EndDate,101) as datetime) 

     Select @EndDate = DateAdd(s,-1,@EndDate)

    --This is usually done in one statement, I broke it out for readability.

     

    --Convert Start Date to midnight

     SELECT @Startdate = cast(convert(varchar, @StartDate,101) as datetime) 

    This gives the full date range.