Calculating Time

B

Bret

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.
 
B

Bret

Much thanks! this link provided a great solution, please I need further
assistance on same matter. This function was provided from your link:
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!
 
R

ruralguy via AccessMonster.com

Here's a link that my be better suited for your issue:
http://www.pacificdb.com.au/MVP/Code/DiffTime.htm
Much thanks! this link provided a great solution, please I need further
assistance on same matter. This function was provided from your link:
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!
[quoted text clipped - 9 lines]
 
D

Duane Hookom

At least one reply in a more recent thread. You should confine your question
to a single thread.

--
Duane Hookom
MS Access MVP

Bret said:
Much thanks! this link provided a great solution, please I need further
assistance on same matter. This function was provided from your link:
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.
 
Top