Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2004
    Location
    Jordan
    Posts
    137

    Unhappy Unanswered: How many FRIDAYs between two dates

    Hi all

    How I can calculate how many FRIDAYs between 2 dates ?

    thanx

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    subtract the two dates & count the number of weeks in the results
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    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. #4
    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. #5
    Join Date
    Feb 2004
    Location
    Jordan
    Posts
    137

    Talking

    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
  •