By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,482 Members | 2,073 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,482 IT Pros & Developers. It's quick & easy.

Help to caculate Employees Hour:minutes towards overtime

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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.com" <fo***@AccessMonster.com> wrote in
message news:18******************************@AccessMonste r.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

P: n/a
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

P: n/a
Jamie,
This one was given to me by someone at Microsoft's Support Line:
Total Hours:
((Hour((TimeOut-LunchIn)+(LunchOut-TimeIn))*60)+Minute((TimeOut-LunchIn)+(LunchOut-TimeIn)))/60
RegularHours: Iif(TotalHours<=8,TotalHours,8)
OTHours:
IIf(And(TotalHours>8,TotalHours<=12),TotalHours-8,Iif(TotalHours>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.com" <fo***@AccessMonster.com> wrote in
message news:18******************************@AccessMonste r.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 discussion thread is closed

Replies have been disabled for this discussion.