how to find the # of workings days [message #3396] |
Wed, 25 September 2002 04:14 |
Saraswathi
Messages: 3 Registered: September 2002
|
Junior Member |
|
|
hi,
can i find the number of working days between two dates using a single SQL query? if yes, can u please tell me the query to do the same?
thank u,
regards,
saraswathi.
|
|
|
|
|
|
Re: how to find the # of workings days [message #3454 is a reply to message #3396] |
Fri, 27 September 2002 22:25 |
chs
Messages: 31 Registered: December 2001
|
Member |
|
|
here is the query to find no of working days between 2 given days.
select sum(decode(to_char(sysdate+rownum,'dy'),'sun',0,'sat',0,1)) cnt_wrkdays
from tab
where rownum < (to_date('31-oct-2002') - sysdate) + 1
|
|
|