Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Nominated Date+Nominated number of workdays

Discussion in 'Information Technology' started by ChrisR, Jul 28, 2006.

  1. ChrisR

    ChrisR
    Expand Collapse
    Guest

    Hi,
    I am looking for an expression that I can put into a form.
    The database is a billing database that has a date when the incovice is
    rendered and to determine the due date I need to add a nominated number of
    business days.
    (ie:17/07/06 + 20 Business days)

    Has any one got a suggestion as this is a bit different to the datediff
    function.

    Thanks in advance.

    Chris
     
  2. Loading...


  3. Douglas J. Steele

    Douglas J. Steele
    Expand Collapse
    Guest

    Take a look in the Date/Time section of "The Access Web"
    http://www.mvps.org/access/datetime/index.html, or check out my September,
    2004 "Access Answers" column in Pinnacle Publication's "Smart Access".

    You can download the column (and sample database) for free at
    http://www.accessmvp.com/djsteele/SmartAccess.html

    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no private e-mails, please)


    "ChrisR" <ChrisR@discussions.microsoft.com> wrote in message
    news:472F4011-B73C-4817-B9A8-AF0F5A9E0937@microsoft.com...
    > Hi,
    > I am looking for an expression that I can put into a form.
    > The database is a billing database that has a date when the incovice is
    > rendered and to determine the due date I need to add a nominated number of
    > business days.
    > (ie:17/07/06 + 20 Business days)
    >
    > Has any one got a suggestion as this is a bit different to the datediff
    > function.
    >
    > Thanks in advance.
    >
    > Chris
     
  4. Ron2006

    Ron2006
    Expand Collapse
    Guest

    Chris,
    It was not elegant and there may be some easier ways but I solved the
    problem by creating a subroutine that

    received fromdate, howmanyworkdays, endingdate(computed this one)

    added 1 to fromdate
    if it was holiday or sunday add 1 to from date but did not subtract
    from work day - start loop again.
    if it was saturday add 2 to from date but not subtract from work day.-
    start loop again.
    subtract 1 from howmany work days
    if howmany workdays > 0 start loop again.

    Ron
     
  5. ChrisR

    ChrisR
    Expand Collapse
    Guest

    Thanks worked well.


    "ChrisR" wrote:

    > Hi,
    > I am looking for an expression that I can put into a form.
    > The database is a billing database that has a date when the incovice is
    > rendered and to determine the due date I need to add a nominated number of
    > business days.
    > (ie:17/07/06 + 20 Business days)
    >
    > Has any one got a suggestion as this is a bit different to the datediff
    > function.
    >
    > Thanks in advance.
    >
    > Chris
     

Share This Page