Results 1 to 2 of 2
  1. #1
    Guitarzan is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2012
    Posts
    15

    Query - Return last 10 days of data (excluding holidays and weekends)

    I already have the query set up to not include weekends or holidays. However now what I want to do is have the query return data values for the past 10 dates that are not the weekends or holidays.



    My main table is dates with $ amounts. I want it to return 10 days worth of data. I'm just not sure how to do this. Right now I just put in a date range and see how many records (days) it returns and then redo moving my start date up or back if I get more or less than 10 days of data.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,618
    So you need a function to calculate the StartDate of the range considering holidays and weekends. This is a rather common topic. Search forum or web. Start with https://www.accessforums.net/queries...83/index2.html - see posts starting with 17 for additional links.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 8
    Last Post: 10-20-2012, 11:25 AM
  2. quarterly, excludes weekends and holidays
    By madagaluna in forum Queries
    Replies: 2
    Last Post: 04-01-2011, 12:56 PM
  3. Replies: 0
    Last Post: 04-01-2011, 09:12 AM
  4. How to analyze holidays/weekends
    By Galio83 in forum Queries
    Replies: 0
    Last Post: 03-31-2011, 12:27 PM
  5. Query DateDiff calculation excluding weekends
    By Masterfinn in forum Queries
    Replies: 3
    Last Post: 04-01-2010, 09:46 AM

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