calculate time

C

clanmccreery

Hello

My time clock database uses "short time" format for
calculating total hours worked, etc. The problem I have
is that there is a field called [pto] which is a number
field, it contains the amount of hours an employee is
eligible to take for pto, such as 80.5 hours. Via a
cross-tab query, I have another field called [ptotaken],
a "short time" field which tells me how much time an
employee has already taken, such as 36:15 hours.
I can't subtract the [ptotaken] from [pto] due to the
different data types. I tried converting [pto] using:

=int([pto])& Format ([pto],"\:nn")

This works fine except in doesn't show the minutes, so
80.5 hours looks like 80:00.

I can't seem to make the [pto] field except input like
80:00 because short time ends at 24 hours.

I would greatly appreciate any help you have, I'm sure
this is something simple I am overlooking.

Thanks!!

Clanmccreery
 
M

Michel Walsh

Hi,


Close, try:

=int( 24* pto ) & Format(pto,"\:nn")



Hoping it may help,
Vanderghast, Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top