473,624 Members | 2,439 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help calculating Time from Fee and Hourly Rate

20 New Member
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 3929
missinglinq
3,532 Recognized Expert Specialist
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 Recognized Expert Moderator Specialist
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
Missionary2008
20 New Member
Thank you both for your help!
Jan 10 '09 #4
missinglinq
3,532 Recognized Expert Specialist
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
5365
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;
2
1810
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 normalization I am including the 9 tables and there fields that I have already developed. I have and I am not sure what to name the tables and I am thinking of making the incident # field the pimary key?? Can I put that in all the tables? I...
3
1672
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...
6
2205
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 employee information, and a method within that class to calculate the weekly pay. For some reason Icant seem to grasp this simple task. Can some plese help me out on this? Thanks import java.util.Scanner;
2
1374
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 time. the Question is is the hours worked has exceeded 40 then the hourly rate must be 1.5 times the normal rate. If there is anyone that can add this overtime bit in will be greatly appreaciated. here are the codes that i have done and that are...
10
7639
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 employee information, and a method within that class to calculate the weekly pay. It seems that the more I read into this, the more confused I get. Any help will be greatly apreciated. Here is my latest code... // Payroll program that...
5
11620
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 hourly rate, and the number of hours worked. Use a constructor to initialize the employee information, and a method within that class to calculate the weekly pay. Once stop is entered as the employee name, the application should terminate. Her's what I...
8
14765
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 40 hours worked by each employee and pays "time-and-a-half" for all hours worked in excess of 40 hours. You are given a list of the employees of the company, the number of hours each employee worked last week and the hourly rate of each employee....
1
1744
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 information, and a method within that class to calculate the weekly pay. Once stop is entered as the employee name the application should terminiate. Below is my previous code and some of what I think I need for this assignment. Any help would be great....
0
8246
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
8179
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,...
0
8685
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...
0
8490
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
7174
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...
0
5570
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
4084
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
4184
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2612
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

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.