Results 1 to 5 of 5
  1. #1
    smartbuyer is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Jan 2017
    Posts
    3

    Exclamation Date minus 1 & Date minus 2 excluding weekends and holidays

    I have been trying to figure out how to get Date-1 and Date-2 excluding weekends and holidays.

    I have table name: tblHolidayDates which has dates of holidays within the year

    I would like to get 1 row of query shows column: 'tD-1' which is (Today's Date minus 1) and column 'tD-2' which is (Today's Date minus 2) which excludes weekends and holidays(tblHolidayDates)

    I have attached 3 scenarios and my expected tD-1 & tD-2 results.

    Any assistance is greatly appreciated
    Attached Thumbnails Attached Thumbnails help.jpeg  

  2. #2
    Ajax is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    9,312
    look to the bottom of this thread for examples of how to do this

  3. #3
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,429
    Welcome to the forum.

    This was interesting and frustrating.

    The function returns the proper dates for me, but I'm in the USA, using US date format (mm/dd/yyyy). You might have problems with the returned dates (it has happened to me before). I did set formatting for display purposes ....
    Attached Files Attached Files
    HTH
    -----
    Steve
    --------------------------------
    "Veni, Vidi, Velcro"
    (I came; I saw; I stuck around.)

  4. #4
    smartbuyer is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Jan 2017
    Posts
    3
    Thank you for this! it looks awesome and I got it to work on my RptDate database.

    The issue I am having now is that I am using the tD-1 and tD-2 in Excel sheets and other databases. So I am now getting an error about the Workday function not being recognized? what can I do to resolve these?

  5. #5
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,429
    Did you copy the Workday function module to Excel or to the other databases??
    HTH
    -----
    Steve
    --------------------------------
    "Veni, Vidi, Velcro"
    (I came; I saw; I stuck around.)

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

Similar Threads

  1. DATE Minus 1 day
    By EileenAchil in forum Queries
    Replies: 2
    Last Post: 12-29-2016, 02:37 AM
  2. Replies: 2
    Last Post: 11-09-2016, 05:44 PM
  3. Replies: 5
    Last Post: 07-01-2014, 02:28 PM
  4. Replies: 8
    Last Post: 10-20-2012, 11:25 AM
  5. Date Add 26 weeks minus 1 day
    By ker9 in forum Queries
    Replies: 3
    Last Post: 07-26-2011, 01:20 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