473,797 Members | 3,212 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Caculating Currency to Time (hours:minutes) format:

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",[TimeIn],[TimeOut])\60,"0\:") & Format(DateDiff ("n",[TimeIn],[TimeOut]) 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 http://www.accessmonster.com
Nov 13 '05 #1
4 2815

Jamie Pittman via AccessMonster.c om wrote:
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",[TimeIn],[TimeOut])\60,"0\:") & Format(DateDiff ("n",[TimeIn],[TimeOut]) 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 http://www.accessmonster.com


1. Convert time to minutes.
2. Divide minutes by 60 to get hours.
3. multiply by rate.

HrlyRate*DateDi ff("n",StartTim e,StopTime)/60

What you're doing is _formatting_. You're forcing the stuff to text
and then trying to multiply by a text value.

Nov 13 '05 #2
I still new to the access part how would I create the formula to convert to minutes? Thanks for the quick response....

--
Message posted via http://www.accessmonster.com
Nov 13 '05 #3
I figured out how to do the formula. I have another issue. When I caculate overtime, I used a yes or no check box. Is there away that if I have a employee work more than 40 hours a week that anything over that will be considered overtime????

--
Message posted via http://www.accessmonster.com
Nov 13 '05 #4
You need to work with centesimal time. 09:15 h. = centesimal 09:25.

regards

"Jamie Pittman via AccessMonster.c om" <fo***@AccessMo nster.com> escreveu na
mensagem news:05******** *************** *******@AccessM onster.com...
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",[TimeIn],[TimeOut])\60,"0\:") &
Format(DateDiff ("n",[TimeIn],[TimeOut]) 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 http://www.accessmonster.com

Nov 13 '05 #5

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

Similar topics

7
9013
by: Stu | last post by:
Is there a simple function call within "C" that I can use to convert number of seconds (keep in mind this may be a type longlong and has to work on UNIX and NT) into Days, months, Hours, Minutes and seconds. If anybody can provide me with an example I would be very grateful. Thanks in advance for all that answer this post.
2
3324
by: J M | last post by:
I rebooted a network device just few minutes ago and getting device-up-time value 3191. How do I convert a time elapsed in days hours minutes and seconds for above value? Example: This device has been up since 0 days 0 hours x minutes and x seconds. TIA!
2
2824
by: Bill nguyen | last post by:
I would like to be able to force "HH:MM" format for a text field to show hours and minutes in military format. User can enter 130 or 0130 and the text would display "01:30" Any suggestion is greatly appreciated. Bill
1
16986
by: markdp | last post by:
I'm trying to write a program that takes a user inputted number of seconds and converts it into hours, minutes and seconds. So for instance, the program prompts the user for seconds, lets say 1000 seconds are inputted. The program will output "there are 0 hours, 16 minutes and 40 seconds in 1000 seconds." I've been trying to do some type of nested loop...but I'm having problems. Any help would be much appreciated! Thanks
1
4238
by: baneaic | last post by:
I'm trying to create a form that will allow a user to enter certain job specifications (# of pages and # of copies) and then have a field that will automatically calculate how long that job will take to run (on a machine which runs at a given number of copies per minute). I have seen very short, control source statement that will format to hours:minutes, but I do not know how to make it format to days:hours:minutes, and most of the jobs...
1
8901
by: Lorisabel | last post by:
I would like to ask for some help with this assignment as i don't know how to start it. Write a C++ program that prompts the user to input the elapsed time for an event in seconds. The program then outputs the elapsed time in hours, minutes, and seconds. (for example, if the elapsed time is 9630 seconds, then the output is 2:40:30.) Can anyone pls help me!! Im using visual studio Thanks to those who help me and have the patience to...
12
16123
by: remya1000 | last post by:
how can i select time (hours,minutes,second) in updown arrow buttons in VB.NET. as we have current time displayed in date and time properties in our system. in date and time properties, while we press updown arrown, that will change only hour first, and if we select the minutes and press updown arrow, minutes will get changed and if we select the seconds and press updown arrow, it will change the seconds. if we use numericupdown tool, i...
3
2941
by: Bert Murphy | last post by:
Im trying to write code that would have seconds for the input,convert the seconds to the hours:minutes:seconds,accumulate the hours:minutes:seconds to a maximum of 999Hours:59Minutes:59Seconds as long as the user inputs more seconds.Then roller over to 0:0:0 and continue. Also need to be able to subtract from the accumulated value. Any help would be appreciated.
5
12888
by: =?Utf-8?B?U2hlbGRvbg==?= | last post by:
Hello - I have about ten integer values that each need to be converted to days, hours, minutes and seconds. I can't seem to find a formula for same that works. These integer values come from a Sql Server database that SUMS up the seconds. The only way SUM will work in SS is with an integer value, therefore, I could not use datetime in Sql Server.) I need to ultimately put the converted values into ten datetimepicker controls.
0
9685
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
10469
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
10246
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10209
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
9066
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
7560
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
6803
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
5582
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4135
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.