Welcome to SPN

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

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

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. OP
    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. OP
    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. OP
    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
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page