I know this question has been addressed before in these forums, but I haven't seen a post that asks the question in the same way I am. I have a query that calculates the differences between several different dates/times in my database. For instance, for each patient who comes in, our database records the date/time they arrived and the date/time that their exam report was dictated.
So, I have used the DateDiff function in the following way to calculate the amount of time in hours between the two exam milestones:
DictationHours: DateDiff("n",[COMPLETED_DT],[DICTATED_DT])/60
The problem, of course, is that we don't want to include weekend hours in our calculations, since we have no doctors working on weekends to dictate reports. So, I need to calculate the difference between the two dates while excluding weekend hours. Every example I can find on this forum deals strictly with the number of non-weekend DAYS elapsed between two dates. Can anyone help me to make the necessary adjustments to give me hours instead of days?
So, I have used the DateDiff function in the following way to calculate the amount of time in hours between the two exam milestones:
DictationHours: DateDiff("n",[COMPLETED_DT],[DICTATED_DT])/60
The problem, of course, is that we don't want to include weekend hours in our calculations, since we have no doctors working on weekends to dictate reports. So, I need to calculate the difference between the two dates while excluding weekend hours. Every example I can find on this forum deals strictly with the number of non-weekend DAYS elapsed between two dates. Can anyone help me to make the necessary adjustments to give me hours instead of days?