Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Weeks Between

Status
Not open for further replies.

nickty

MIS
May 25, 2001
23
0
0
GB
Hi, I'd like to find the number of weeks between 2 dates

ie start_date 1st-Aug-2002
end_date 31st_July-2003

How do I work out the number of weeks between these 2 dates???
thanks for your help

 
Nickty,

How does this look:

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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top