A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

calculate time



 
 
Thread Tools Display Modes
  #1  
Old May 24th, 2004, 12:18 AM
clanmccreery
external usenet poster
 
Posts: n/a
Default 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  
Old May 25th, 2004, 01:00 PM
Michel Walsh
external usenet poster
 
Posts: n/a
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:41 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.