Converting time value to Decimal

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

A previous post provided the below great solution to calculate the difference
between 2 time values.
Hours: Format([TimeIn]-1-[TimeOut],"Short Time")
TimeIn TimeOut Hours
8:00:00 AM 4:30:00 PM = 08:30

I now need to multiply the above calculated elapsed time by the hourly rate
of an employee to get their pay. (ie: 10.00 X 08:30 ). However due to the
formula being currency times time data type, it of course doesn't work. I've
tried all kinds of formatting but am stumped to make it work, how can or
should this be done?

thank you!
 
Bret, please try not to post the same question re-written 4 times in less
than an hour - you are less likely rather than more likely to get a response.

however,

http://www.accessmvp.com/DJSteele/SmartAccess.html

should answer all your questions.

TonyT..


Bret said:
A previous post provided the below great solution to calculate the difference
between 2 time values.
Hours: Format([TimeIn]-1-[TimeOut],"Short Time")
TimeIn TimeOut Hours
8:00:00 AM 4:30:00 PM = 08:30

I now need to multiply the above calculated elapsed time by the hourly rate
of an employee to get their pay. (ie: 10.00 X 08:30 ). However due to the
formula being currency times time data type, it of course doesn't work. I've
tried all kinds of formatting but am stumped to make it work, how can or
should this be done?

thank you!

ruralguy via AccessMonster.com said:
Maybe these links will help:
http://www.mvps.org/access/datetime/date0004.htm
http://www.mvps.org/access/datetime/date0009.htm

Displaying the results down to the minute is just a Format() function.


--
HTH - RuralGuy (RG for short) acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
 
This was not intentional posting of 4X.
I received a Microsoft error 3 times saying my post was unsuccessful,
however my apologies, thanks for help

TonyT said:
Bret, please try not to post the same question re-written 4 times in less
than an hour - you are less likely rather than more likely to get a response.

however,

http://www.accessmvp.com/DJSteele/SmartAccess.html

should answer all your questions.

TonyT..


Bret said:
A previous post provided the below great solution to calculate the difference
between 2 time values.
Hours: Format([TimeIn]-1-[TimeOut],"Short Time")
TimeIn TimeOut Hours
8:00:00 AM 4:30:00 PM = 08:30

I now need to multiply the above calculated elapsed time by the hourly rate
of an employee to get their pay. (ie: 10.00 X 08:30 ). However due to the
formula being currency times time data type, it of course doesn't work. I've
tried all kinds of formatting but am stumped to make it work, how can or
should this be done?

thank you!

ruralguy via AccessMonster.com said:
Maybe these links will help:
http://www.mvps.org/access/datetime/date0004.htm
http://www.mvps.org/access/datetime/date0009.htm

Displaying the results down to the minute is just a Format() function.

Bret wrote:
My program is an input form for employee timesheets.
I have 2 combo boxes, User enters "Time In' in one and "Time Out" in the
other.
(ie: 8:00am IN, 4:30PM OUT) datatype is date/time.
How do I calculate the total time worked down to the minute?

thank you.

--
HTH - RuralGuy (RG for short) acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
 
Back
Top