Page 1 of 1

How to find days b/w two dates

Posted: Fri Apr 11, 2008 9:16 am
by keerti_rose
Hi Friends..

Can any one guide me..How to find days b/w two dates...

Posted: Fri Apr 11, 2008 11:29 am
by admin
select * from my_table where my_date between start_date and end_date;

Posted: Fri Apr 11, 2008 2:22 pm
by mirza_rehan
SELECT date2 - date1 FROM dual;


FOR example

SELECT TO_DATE('15-JAN-2008') - To_DATE('01-JAN-2008') diff_bet_date
FROM dual;


hope it will help you

regard
Rehan Mirza

Posted: Fri Apr 11, 2008 2:27 pm
by admin
Thanks Rehan for giving more close answer so let see will it work for keerti_rose or he/she will again as only working days like excluding sundays. thanks

Posted: Sun Apr 13, 2008 2:57 am
by keerti_rose
Hi Mate Thanks a lot