1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How can i calculate calendar 's weekly off days in Oracle

Discussion in 'Oracle' started by Teji, Nov 15, 2008.

  1. Teji

    Teji New Member

    Joined:
    Sep 11, 2008
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Software developer
    Location:
    India
    How can i calculate calendar 's weekly off days in Oracle
     
  2. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,012
    Likes Received:
    203
    Trophy Points:
    0
    Occupation:
    Senior Support Engineer
    Location:
    England
    You need a day of week function (RTFM for TO_CHAR), then if this represents Sunday as 0, Monday as 1 etc and if your offdays are Tuesday and Thursday then it's just if (day==2 || day==4) (using C syntax, but you can translate that into PL/SQL easily enough).
     

Share This Page