Results 1 to 3 of 3
  1. #1
    TimMoffy is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    May 2012
    Posts
    29

    Working Days From Todays Date

    Hope someone can help me and that i'm in the correct forum for this.
    I have created a form that captures the date on which a customer makes contact wiht us. As part of our regulatory requirements we are required to acknowledge this contact within 5 days.

    So i have a field called [dtmDateRecieved]. What i am trying to work out is how to calculate 5 workings day forward from this date. in other words if today is the 26/3/2013, then what will the date be in five working days time, ignoring public and bank holidays? I know how to do it in Excel as a formula but that doesnt seem to work in Access.



    I have found lots of articles of how to calculate the number of working days between two dates, but not counting forward from a fixed point like this.

    Many thanks in advance for your help

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    Assuming your initial contact happens on the workweek (m-f):

    IIf(Weekday(DateAdd("d", 4, contactdate)) = 1, DateAdd("d", 5, contactdate), IIf(Weekday(DateAdd("d", 4, contactdate)) = 7, DateAdd("d", 6, contactdate), DateAdd("d", 4, contactdate)))

    The formula would have to change if your initial contact can be on a weekend as well.

    IIf(Weekday(DateAdd("d", 4, contactdate)) = 1 Or Weekday(contactdate) = 1, DateAdd("d", 5, contactdate), IIf(Weekday(DateAdd("d", 4, contactdate)) = 7 Or Weekday(contactdate) = 7, DateAdd("d", 6, contactdate), DateAdd("d", 4, contactdate)))

  3. #3
    TimMoffy is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    May 2012
    Posts
    29
    We only work M-F so the first part works well. Many many thanks for your hlep. I'd never have worked that out on my own.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Change Name of File with todays Date
    By tcheck in forum Access
    Replies: 1
    Last Post: 12-18-2012, 12:32 PM
  2. Replies: 6
    Last Post: 10-05-2012, 02:38 PM
  3. Replies: 3
    Last Post: 07-09-2012, 05:59 AM
  4. Replies: 1
    Last Post: 12-12-2011, 06:32 AM
  5. Adding todays date
    By EDEd in forum Forms
    Replies: 2
    Last Post: 10-08-2010, 06:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums