If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
calculate time
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 |
#2
|
|||
|
|||
calculate time
Hi,
Close, try: =int( 24* pto ) & Format(pto,"\:nn") Hoping it may help, Vanderghast, Access MVP "clanmccreery" wrote in message ... 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 |
Thread Tools | |
Display Modes | |
|
|