Results 1 to 2 of 2
  1. #1
    EDubb is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    May 2013

    Question Using Datediff to calculate elapsed hours, need help with excluding weekends


    I am fairly new to Access, and have read several threads regarding this topic being done in days, but have been unable to adapt and/or alter any solutions to fit what I am trying to do. What I have is a query that contains a start date, start time, end date, end time of manufacturing orders. I was able to find some code that I adapted to calculate the elapsed time in hours from the start of the order to the end, and it works great, however - I need to it to make that calculation excluding weekends and holidays. Below is what I'm currently using - any help would be greatly appreciated!

    ELAPSED: (DateDiff("n",[START_DATE] & " " & [START_TIME],[END_DATE] & " " & [END_TIME]))\60 & Format(((DateDiff("n",[START_DATE] & " " & [START_TIME],[END_DATE] & " " & [END_TIME])) Mod 60)/60,":hh")

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    The Great Land
    Need a custom function.

    Has been discussed in forum, search forum.

    Google: access vba elapsed time function exclude weekend holiday

    How to attach file: 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: 14
    Last Post: 09-11-2013, 01:10 PM
  2. Replies: 7
    Last Post: 07-25-2011, 02:50 AM
  3. Replies: 0
    Last Post: 04-01-2011, 09:12 AM
  4. DateDiff Excluding Weekends
    By cs93 in forum Programming
    Replies: 1
    Last Post: 03-25-2011, 04:09 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