Time Calculations In QueryUpload ImagesLink Lydia ONeal 14 months ago
I received the 15-minute increment video in response to my question from last week. I had already seen this video, but was wanting to see the additional information you mentioned about calculating to the nearest quarter hour and removing breaks to get total time worked. Can you provide me with what to review for this information. It is not mentioned in the 15-minute increment video that I can see. Thank you.
Richard, I appreciate you trying to answer my questions regarding calculating total work time. Can you tell me what paid course I could do in order to get the answers I need. Again, I want to know how to calculate a value from a clock in and a clock out time to nearest quarter hour minus lunch breaks, etc. I just don't want to pay for a course if it does not have this type of detail explanation in it. Sorry if I am asking the same thing, just not getting a satisfactory resolution.
Thank you.
Calculating to the nearest 15 minutes is covered in this video. I don't understand what you are trying to do differently. As far as removing breaks goes, that's going to involve some significant programming, much like removing holidays and non-work days does. I cover that in Calculate Total Time w DateDiff video that Alex posted. Everything you're asking for has already been covered in different videos. You just need to put it all together for your own custom needs. It's like I always say: building with Access is like playing with Legos. You can put the pieces together any way you want. If you want an easier solution, split up your entries into two times: one before lunch, and one after. Have them clock IN and OUT and then you can easily add that together instead of trying to pull times OUT of the middle.
If you want to take a bunch of existing calculations and round them to the nearest 15 minutes, then you'll have to use the above technique and run your times through an Update Query.
Lydia ONeal 14 months ago
Please provide me with the link to the 40 minute extended video referenced in your 'Time Spent' free tech video. It goes through setting up exclusions. I believe I should be able to get this since I signed up for gold membership, correct? I went directly to YouTube and I am not seeing the link you reference in the video. Thank you.
It's right here: Time Spent. Yes, you have access to it as a Gold Member, but since you signed up here on my site, you have to watch it on my site. You cannot watch it on YouTube. This is all explained in the signup info.
Lydia ONeal 14 months ago
Thank you Richard. Got it.
Lydia ONeal 14 months ago
I have learned lots on the extended cut video. Thank you. I am having a problem with the Option Explicit on my DB. It returns a 'Compile Error' on the Exclude Weekends as such.
CurrentWeekday = Weekday(CurrentTime)
If excludeweekends And (CurrentWeekday = 1 Or CurrentWeekday = 7) Then
' it's a weekend, skip.
Else
The compile error goes away when I remove the Option Explicit. What would I need to do in the Tools Reference list and/or in the code to fix this?
Option Explicit means you have to explicitly declare your variables or they need to be fields on an underlying form. Generally you get this error message if you have something spelled wrong or you forgot to DIM a variable.