473,799 Members | 3,061 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Overtime Query

I have designed a "Time Tracker Database"... Basically a Time Clock. I

have report that calculates the number of regular hours worked per
week.

Currently I am running the following query:
-----------------------------------------------------------

SELECT DateFilter.Empl oyee, DateFilter.Time TypeIn,
Sum(DateDiff("s ",[ClockIn],[ClockOut]))\3600 &
Format((Sum(Dat eDiff("s",[ClockIn],[ClockOut])) Mod
3600)/86400,":nn:ss") AS TotalTime
FROM DateFilter
GROUP BY DateFilter.Empl oyee, DateFilter.Time TypeIn
HAVING (((DateFilter.T imeTypeIn)="Reg ular"));

-----------------------------------------------------------

This works great, and returns the total time. Now, what I would like
to do is calculate overtime. So basically I want:

TotalTime - 40 hours = Overtime

TotalTime would be calculated with the DateDiff above...

Any suggestions to accomplish this?

Feb 24 '06 #1
0 1684

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
5381
by: Eric Whittaker | last post by:
here's my dilemma, on the program below, i am trying to calculate overtime pay at time and a half, but instead of only counting the hours after 40, it counts all hrs at that rate, how can i avoid this? thanks. // figures hourly wages for employees #include <iostream> #include <conio.h> using std::cout;
3
2454
by: Jamie Pittman via AccessMonster.com | last post by:
I am currently working on a project to take an employees time for a day and and if over 8 hours it would move those extra hours to overtime row amd not caculate into regular time. I started to use this formula but it is probably way off trak , for it is giving me an error stating that it will match to many records. ANYONE PLEASE HELP..... Total Time in Minutes: DateDiff("n",,)/60 -- Message posted via http://www.accessmonster.com
3
2091
by: Jamie Pittman via AccessMonster.com | last post by:
I am having trouble bellow wit this query. I have the total regular hours and the overtime. The problem is that if it is 8 hours and under, I need it to show as regular hours. Any thoughts? SELECT ., .Date, ., IIf(<=8,,8) AS , Sum((-)) AS Ot FROM GROUP BY ., .Date, ., IIf(<=8,,8); -- Message posted via http://www.accessmonster.com
5
12996
by: Jamie Pittman via AccessMonster.com | last post by:
I have two tables with 5000 entries on them. One is based for regular time with several variables example (employee name, date,time in and out, code, customer, building) I have another table that works with overtime but has the same feilds within the table. I want to be able to run a report that combines the regular time and overtime for the warehouse and seperated by each customer. I have tried join tables but I keep ending with, (if it...
3
2268
by: michb | last post by:
I need to be able to calculate on a daily basis, both normal and overtime hours for both payroll and job costing. I also then need to calculate the above on a weekly basis, in order to complete the payroll. I have employee normal, time/half and double time rates in $value in one table, then in another I have log in and out times; then another job start and stop time. I realize the code is probably logical-but I am not brilliant with
3
1679
by: Brett | last post by:
For those of you working hourly, are you paid time and a half for anything over 40 hours? Say you are making $50/hour. Once you go over 40, your rate goes up to $75. If so, do you find it difficult to get that rate? In other words, does management hangle and bicker with you and in the end make you end up working for the $50 rate? How practical is it for a skilled C# developer to work from contract to contract? Short term: 3 - 9...
0
297
by: Drum2001 | last post by:
I have designed a "Time Tracker Database"... Basically a Time Clock. I have report that calculates the number of regular hours worked per week. Currently I am running the following query: ----------------------------------------------------------- SELECT DateFilter.Employee, DateFilter.TimeTypeIn, Sum(DateDiff("s",,))\3600 &
3
2903
by: foxykitty | last post by:
Hi, How can I group in my qryMonthlyHours in SQL view by , and then sum done in that month? I have another query - qrySaturdayRota ,,,,, ALL THIS IS GROUPED EXCEPT FOR has a criteria = Like "Saturday Rota" Or Like "Sat Rota" Or Like "Rota"
1
2478
cori25
by: cori25 | last post by:
Employee's input the shifts they want, once I have all this data I need to determine who will get what shifts depending on a reliability %, if thats the same then I look at the time stamp. I have come to the point where I am pulling out the duplicate date's in a query. Name Date Shift Reliability Buck, Jack 1/2/2008 4:00 PM-12:30 AM 0.16254 smith, frank 1/2/2008 4:00 PM-12:30 AM 0 Jones,...
0
9540
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10222
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10026
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9068
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7564
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6805
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5463
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5585
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3757
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.