Calculating Hours Mins worked over week period

S

SysAdmin

Hello,
Thanks in advance if anyone can advise me on this one...

I have a database field which the user types in a hours worked for the week
and another for any overtime. I want the user to be able to enter 37.45
instead of 37.75 if he means the work was 37 hours 45 minutes.

TotalHHMMs: [BasicHHMMs] + [OvertimeHHMMs]

I have solved it by using a shadow field with the following calculation.

BasicDecimal:
((Int[BasicHHMMs]*60)+([BasicHHMMs]-(Int[BasicHHMMs]))*100)
/60 for hours

Same for the overtime field. Then i can add them in hours or mins

Also using (((Int(Mins/60)*60)/100)+Int(Mins/60)) to convert the mins to
hours + mins

Please, Please someone tell me this could be achieved much easier!!! A
little known field type for hours/mins???

If anyone knows of a good help for calc hours /mins then please post it
here. The solution above works but I am sure there is a better way....?

SysAdmin
 
D

Douglas J. Steele

Already answered in another newsgroup to which you posted the same question
(I think it was microsoft.public.access)

If you feel you need to post to more than one group (HINT: it's seldom
necessary), please have the courtesy to cross-post (send the one message to
all groups at once), rather than multi-post (send individual messages to
each group). In this way, all responses to your post will be available
together, regardless of what group the responder was in, and the rest of us
won't have to read your post multiple times. (It also uses fewer server
resources)

I see you're using Outlook Express. Click the "Newsgroups:" label to the
left of the box containing the name of the current newsgroup. That will open
a dialog that will let you add additional newsgroups to your post. Note that
it's generally consider to be A Bad Thing to cross-post to more than about 2
or 3 newsgroups. (In fact, at
http://www.microsoft.com/presspass/features/2001/Mar01/Mar27pmvp.asp
Microsoft suggests that "One group will suffice")
 

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

Top