Results 1 to 2 of 2

Thread: Date function

  1. #1
    Join Date
    Oct 2003
    Posts
    1

    Question Unanswered: Date function

    Is there a way to calculate the number of Fridays in the current month? I'm sure there is! Maybe with the SYSDATE function? Ideas welcome! Thanks..

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: Date function

    First day of current month: trunc(sysdate,'mm')
    Last day of current month: last_day(sysdate)
    Next Friday AFTER a given date: next_day(date,'FRI')

    Using the above:

    (next_day(last_day(sysdate),'FRI') - next_day(trunc(sysdate,'MM')))/7

    gives number of Friday's in the current month (I think - please check!)

Posting Permissions

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