Click here to Skip to main content
15,888,269 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I want to find out the number of days gap between two dates excluding Sundays.
How can I do this in oracle?

Please help me.
Posted
Updated 4-Jan-11 0:35am
v2
Comments
Dalek Dave 4-Jan-11 6:35am    
Edited for Grammar and Clarity.

i found the exact answer for it.
Here is the query for it.

<br />
SELECT count(dt)   FROM<br />
(SELECT TO_DATE('30-nov-2010') + level - 1 dt FROM dual CONNECT BY level <=(TO_DATE('12-Dec-2010')-TO_DATE('30-nov-2010')))<br />
where to_char (dt,'D')<>1<br />
 
Share this answer
 
Comments
Dalek Dave 4-Jan-11 6:35am    
Excellent Answer.
I found THIS[^] discussion useful for getting business days count between dates. Make modification to your requirement accordingly.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900