计算工作日的方法

create or replace function fun_workday(startdate in varchar2,
enddate in varchar2)return number
as
TOTALVALUE NUMBER;
begin
select count(*)
into TOTALVALUE
from (select rownum rnum
from all_objects
where rownum <= to_date(enddate, 'yyyy-MM-dd') -
to_date(startdate, 'yyyy-MM-dd') + 1)
where to_char(to_date(startdate, 'yyyy-MM-dd') + rnum - 1, 'D') not in
('1', '7');
return TOTALVALUE;
end;
阅读更多
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页