DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: Capture First Monday From Each Month

Hybrid View

  1. #1
    Join Date
    Jul 2001
    Posts
    334

    Capture First Monday From Each Month

    Hi All,

    I need to capture first Monday date of each month, how it is possible?

    e.g Oct, 01/2007, Nov, 05/07, Dec, 03/07 ......


    Thanks,
    Arshad

  2. #2
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    First Monday of each month has to be in between day(1,7)
    Do a loop and ask Oracle for the name of the day, when Monday=True you got your match.
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  3. #3
    Join Date
    Jul 2001
    Posts
    334
    Thanks for the information.!

  4. #4
    Join Date
    Sep 2007
    Posts
    36
    ...or you can use next_day..

    eg, give me the first Monday AFTER the last day in September (ie the first in October)

    SELECT NEXT_DAY('30-SEP-07','Monday')
    FROM dual;

    j

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