Right now, using MS SQL 2k, we use the following query to get "number of business days".
case
when DATEDIFF ( dd , dbo.table_case.creation_time , dbo.table_close_case.close_date )
- DATEDIFF ( wk, dbo.table_case.creation_time , dbo.table_close_case.close_date )*2 <0 then 0
else DATEDIFF ( dd , dbo.table_case.creation_time , dbo.table_close_case.close_date )
- DATEDIFF ( wk, dbo.table_case.creation_time , dbo.table_close_case.close_date )*2
end
It doesn't really do anything except for subtract weekends. But instead of being happy with that, the Boss says "Ok, now pull out holidays as well". Any thoughts on how to approach that?