I have to find the number of business days using mysql.I am using this query but this is not giving me the correct result
SELECT ((DATEDIFF('2015-05-31', '2015-05-01')) -((WEEK('2015-05-31') - WEEK('2015-05-01')) * 2) -
(case when weekday('2015-05-31') = 6 then 1 else 0 end) - (case when weekday('2015-05-01') = 5 then 1 else 0 end))
as DifD ;
It is giving 19 as output where number of business days should be 20 Somebody please help