#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2003
    Posts
    69
    Rep Power
    11

    Lightbulb Day count between 2 dates - weekends


    Hi,

    I want no number of days between two selected dates and before you say - you dumbo....here is the catch

    I want only number of working days! Is it possible to do it in oracle?

    Thanks in advance.
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2004
    Posts
    1
    Rep Power
    0

    check this script


    select trunc(months_between(to_date('01/06/2003','MM/DD/YYYY'),
    to_date('10/15/1992','MM/DD/YYYY'))/12)
    ||' years '||
    mod(trunc(months_between(to_date('01/06/2003','MM/DD/YYYY'),
    to_date('10/15/1992','MM/DD/YYYY'))),12)
    ||' months '||
    trunc(to_date('01/06/2003','MM/DD/YYYY') -
    add_months(to_date('10/15/1992','MM/DD/YYYY'),
    months_between(to_date('01/06/2003','MM/DD/YYYY'),
    to_date('10/15/1992','MM/DD/YYYY'))))
    ||' days' "Year_Month_Day"
    from dual;


    Originally Posted by rabindra
    Hi,

    I want no number of days between two selected dates and before you say - you dumbo....here is the catch

    I want only number of working days! Is it possible to do it in oracle?

    Thanks in advance.

IMN logo majestic logo threadwatch logo seochat tools logo