Viewing 2 posts - 1 through 2 (of 2 total)
Well, the inverse is true for me. Maybe you have a server setting that allows datepart to be quoted? Something other than
DATEDIFF ( datepart , startdate , enddate )
and the...
February 7, 2014 at 9:13 pm
#1687299
Nice, but I think you meant
set @start_of_day = dateadd(day,datediff(day,0,@date),0);
rather than
set @start_of_day = dateadd(day,datediff('day',0,@date),0);
or am I missing something?
February 7, 2014 at 12:20 pm
#1687198