SQL : Counting the no: of fridays between two dates
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: SQL : Counting the no: of fridays between two dates

  1. #1
    Join Date
    Sep 2005
    Posts
    46

    SQL : Counting the no: of fridays between two dates

    Hai every body,

    My issue is that i have a startdate and enddate. Using a query I need to find the total No: of fridays(or any day) between those dates.

    Using SQL is it possible to do that?


    PLease help

    Regards
    Issac

  2. #2
    Join Date
    Nov 2001
    Location
    UK
    Posts
    152
    select (next_day('26-oct-2005', 'FRI') - next_day('03-oct-2005', 'FRI'))/7 from dual

  3. #3
    Join Date
    Sep 2005
    Posts
    46
    Scorby....
    That was just superb

    THanks a lot...

    Regards
    Issac

Posting Permissions

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


Click Here to Expand Forum to Full Width