473,396 Members | 2,036 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Help calculating Time from Fee and Hourly Rate

Thank you in advance for your help.

I'm trying to calculate the Total Time in hours and minutes to complete a job. The way we are calculating it is by taking the Fee paid and dividing that by a 1:00.

In Excel - Marsh is charged $90.00 (This is pre-determined)
Her job is a $25.00/hour job (This is pre-determined)
The Raw Hours to complete the job is 3.6 hours (I have this already in
a qry)
the Total Time to complete the job is 3:36. (Can't figure out how to get
this.
Jan 10 '09 #1
4 3911
missinglinq
3,532 Expert 2GB
Expand|Select|Wrap|Line Numbers
  1. Me.TotalTime = (Me.RawHours * 60) \ 60 & ":" & (Me.RawHours * 60) Mod 60
Not that I used the Backslash in the first half of the expression. The Backslash only returns the Integer portion of the division, the 3 in your example.

Linq ;0)>
Jan 10 '09 #2
Stewart Ross
2,545 Expert Mod 2GB
Hi. The 3.6 is the time in hours expressed as a decimal value. It is derived as the ratio of the fee paid to the hourly rate:

3.6 = 90 / 25, generalised to

[Time in Hours Decimal] = [Fee Paid] / [Hourly Rate]

The 3:36 you mention is the time expressed in hours and minutes:
3.6 hours converted to hours and minutes =
3.6 * 60 minutes = 216 minutes = 3 hours and 36 minutes.

As the times you are referring to are not clock times - it is simply a total for hours:minutes, not a time of day - I would suggest that it is best to work in total minutes if you have any further calculations, or separately in hours and minutes if you don't, then combine back to hours and minutes for final presentation if need be.

The calculations are as follows.

If working in total minutes (should you need to do any other calculations such as adding the total hours from different jobs):

[Total Minutes] = [Time in Hours Decimal] * 60
[Hours] = Int([Total Minutes]/60)
[Minutes] = [Total Minutes] - (Int([Total Minutes]/60)*60)

If you do not have other values you need to add on the calculations are even simpler:

[Hours] = Int([Time in Hours Decimal])
[Minutes] = ([Time in Hours Decimal] - Int([Time in Hours Decimal]))*60

For presentation as hours:minutes on a report or somesuch, you can simply combine the hours and minutes values as follows:

[Time in Hours:Minutes] = [Hours] & ":" & [Minutes]

-Stewart

ps but Linq's equivalent solution is much simpler!!
Jan 10 '09 #3
Thank you both for your help!
Jan 10 '09 #4
missinglinq
3,532 Expert 2GB
Glad we could help!

Linq ;0)>
Jan 11 '09 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
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...
2
by: John C | last post by:
I am trying to develop a access database version 2002 from scratch and I am a novice programmer and need much direction. I have been researching and studying about relational database design and...
3
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...
6
by: porky008 | last post by:
I need to modify the following program so that it uses a class to store and retrieve the employee's name, the hourly rate, and the number of hours worked. Use a constructor to initialize the...
2
by: ForsakenAnR | last post by:
Hello is there is any one out there that can help me i just been given this exercise to do and i have done most of it i just need help on alittle bit... The bit i need help on is adding the over...
10
by: ycg0771 | last post by:
I'm trying to modify the following program so that it uses a class to store and retrieve the employee's name, the hourly rate, and the number of hours worked. Use a constructor to initialize the...
5
by: jbailey006 | last post by:
I am trying to add the following information to a payroll program I am working on for assignment. Modify the Payroll Program so that it uses a class to store and retrieve the employee's name, the...
8
by: hmmtn | last post by:
I would appreciate any help on this one. Assignment is as follows: Develop a program that will determine the gross pay for each of several employees. The company pays "straight time" for the first...
1
by: tikney5 | last post by:
I need to modify my current program so that is uses a class to store and retrieve the employees name, hourly rate, and number of hourse worked. Use a constructor to initialize the employee...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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,...

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.