col x heading "Date Differences"
select end_date||' and '||start_date||' differ by '||
trunc((end_date-start_date)/7)||' weeks and '||
mod(end_date-start_date,7)||' days.' x
from two_dates
Date Differences
------------------------------------------------------
30-JUL-03 and 01-AUG-02 differ by 51 weeks and 6 days.
31-JUL-03 and 01-AUG-02 differ by 52 weeks and 0 days.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.