Problem
You need a simple SQL to calculate business days between two datesSolution
select count(1)from dual,
(select to_date('30-OCT-2016') end_date, trunc(sysdate) start_date from dual) t
where to_char(t.start_date + level, 'D') not in (1,7) connect by t.start_date + level <= t.end_date
Replace to_date('30-OCT-2016') and trunc(sysdate) with the dates you want.
Also utilise last_day functions if you just have a month number or name.
Comments
Post a Comment