473,785 Members | 2,443 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help to caculate Employees Hour:minutes towards overtime

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",[TimeIn],[TimeOut])/60

--
Message posted via http://www.accessmonster.com
Nov 13 '05 #1
3 2453
Somewhere in a query for time sheets I used

HoursWorked: IIf(Not
IsNull([TimeOut]),Sum((DateDiff ("n",[TimeIn],[TimeOut])/60)),0)

Need to make sure the have "Clocked Out" otherwise the time is meaningless

HTH

Phil
"Jamie Pittman via AccessMonster.c om" <fo***@AccessMo nster.com> wrote in
message news:18******** *************** *******@AccessM onster.com...
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",[TimeIn],[TimeOut])/60

--
Message posted via http://www.accessmonster.com

Nov 13 '05 #2
This formula gave me the total caculated hrs, which I can use to mutiply base cost. What I want to achive from this point is if an Employee worked mor than 40 hrs I want that amout to count towards overtime. Any ideas???

--
Message posted via http://www.accessmonster.com
Nov 13 '05 #3
Jamie,
This one was given to me by someone at Microsoft's Support Line:
Total Hours:
((Hour((TimeOut-LunchIn)+(Lunch Out-TimeIn))*60)+Mi nute((TimeOut-LunchIn)+(Lunch Out-TimeIn)))/60
RegularHours: Iif(TotalHours< =8,TotalHours,8 )
OTHours:
IIf(And(TotalHo urs>8,TotalHour s<=12),TotalHou rs-8,Iif(TotalHour s>12,4,0))
DTHours: IIf(TotalHours> 12,TotalHours-12,0)

The syntax is more Excel than Jet/Access but the concepts are there. In
code I'd probably declare some constants for my break points between
regular, overtime and doubletime hours so that code maintenance was less of
a headache if I ever needed to modify the break points.

"Jamie Pittman via AccessMonster.c om" <fo***@AccessMo nster.com> wrote in
message news:18******** *************** *******@AccessM onster.com...
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",[TimeIn],[TimeOut])/60

--
Message posted via http://www.accessmonster.com

Nov 13 '05 #4

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

Similar topics

4
2814
by: Jamie Pittman via AccessMonster.com | last post by:
I am running into a error problem I am currently using this formula with in a qurrey and it is working great. Total Time : Format(DateDiff("n",,)\60,"0\:") & Format(DateDiff("n",,) Mod 60,"00") I want to be able to take the Total Time field and mutiply it to an Employee's {BASE RATE] to achive a total cost for the day????? Any suggestions with this, Really need help, getting frustrated... -- Message posted via...
0
1518
by: Henry | last post by:
Hi Everyone, My name is Henry and I'm a Master of Computing student at Unitec New Zealand (www.unitec.ac.nz). I'm currently doing my Thesis titled: "Utilizing Newsgroups as Customer Support Tool in Software Development Companies". This research is about whether or not Newsgroups are effective for providing customer support with low cost. This is **strictly** academic, non-profit research, only doing it to complete my degree. You are...
1
3969
by: Peter | last post by:
Hello Thanks for reviewing my question. I would like to know if there is a control (with up/down buttons) for setting a duration of time. I want give the user the ability of entering a duration (hh:mm:ss). Does VS.NET offer this type of control Many Thank Peter
3
1255
by: Scott | last post by:
I am trying to convert a RTF File to a Post Script file to be sent to the printer. I can write this program in either C# or VB.NET. Please help.. Thank you, Scott.
2
1132
by: David | last post by:
I have an application that stores the time information received via the serial port from some hardware. The application needs to compare this time gainst the time received in the last packet and see if the difference is greater than a timeout period that is stored in a database record for that hardware. The data comes in as bytes that are packed BCD values in 24 hour format. ie. 2:15:00 pm would be received as 14h 15h 00h
5
1479
by: coinjo | last post by:
Problem Statement One of the local banks is gearing up for a big advertising campaign and would like to see how long its customers are waiting for service by teller/service provider at drive-up window. Several employees have been asked to keep accurate records for the 24-hour drive-up service. The collected information, which is read from a file, consists of ID number of the teller; the time the customer arrived in hours and minutes...
9
1478
by: Jamiil | last post by:
This is not a question where the source code is important, it is not important at all. So don't expect to find answers to my questions in the code; the answers will be in how the class interacts with the rest of the program and/or how GCC can help me resolve my problem. Having said that, I have a class called 'Person', and a class called 'io_base', the purpose of 'io_base' is to implement file input and output in a uniform manner for all...
0
939
by: itstooloud | last post by:
I work for a small business, and we process paperwork that is very repetitive. We receive it via e-mail and it is usually laid out basically the same. The e-mail is on an IMAP server. We use Outlook to check it. We input it into a Retail program (RetailIQ) and save it. What I need is to know what kind of language to use to write a script to check the mail, whether through outlook or through the server itself, and search for specific titles...
1
1741
nirmalsingh
by: nirmalsingh | last post by:
Hai all, i am having a number as 659(minutes), i want to convert it to time format such as 6:59, how to do this? thanx in advance. regards Nirmal
0
9647
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10357
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10101
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
8988
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
7509
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
5528
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4063
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2893
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.