Viewing 2 posts - 1 through 3 (of 3 total)
I made some corrections... I tried to create single query.
SELECT (DATEDIFF(d, @startdate, @enddate)/7) + CASE WHEN DATEPART(dw, @startdate) = (6) OR DATEPART(dw, @enddate) = (6)...
July 24, 2003 at 8:29 am
#466827
This one should work. It is single query.
You can change number (6) to number of day that you need to count. Friday = 6 when SET DATEFIRST 7.
July 24, 2003 at 6:22 am
#466769