# Thread: How many FRIDAYs between two dates

1. Registered User
Join Date
Feb 2004
Location
Jordan
Posts
137

## Unanswered: How many FRIDAYs between two dates

Hi all

How I can calculate how many FRIDAYs between 2 dates ?

thanx

2. Registered User
Join Date
Aug 2003
Location
Where the Surf Meets the Turf @Del Mar, CA
Posts
7,776
subtract the two dates & count the number of weeks in the results

3. Registered User
Join Date
Feb 2004
Location
Jordan
Posts
137
this was the first idea I did,
but the problem is :
for ex. where the period start with SATURDAY and end with THURSDAY
then the number of weeks is not the number of FRIDAYs

4. Registered User
Join Date
Jan 2004
Posts
370
If the period starts on a Friday, should that Friday be included in the count?

Not including the start period Friday:
select trunc(to_number(end_date - next_day(start_date, 'Friday'))/7) + 1 from dual;

Including the start period Friday
select trunc(to_number(end_date - next_day(start_date - 1, 'Friday'))/7) + 1 from dual;

Use appropriate values/conversion functions for start and end dates.

.

5. Registered User
Join Date
Feb 2004
Location
Jordan
Posts
137
Thanx alot ((((( SkyWriter )))))

It's working ok.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•