Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Time Calculations 1

Status
Not open for further replies.

WingandaPrayer

Technical User
May 15, 2001
152
Hi

A few questions regarding calculating time.

Current Fields

TimeInMorning
LunchOut
AMTotalHours
LunchDuration
LunchIn
TimeOutEvening
PMTotalHours

Using the short time I have total hours for AM and PM

First question how do I add these totals together.

Q 2

LunchDuration……..The time between LunchOut and LunchIn should not be less than 30 minutes.If it is I would like the difference to be decreased from the total hours at the end of the day.

Example
TimeInMorning….LunchOut…AMTotalHours…LunchDuration.LunchIn…TimeOutEvening
…..08:00…………12:01………..04:01…………………00:29…...12:30………..17:05……………

…PMTotalHours
.04:35………….04:01 + 04:35-00:01=08:35
Q3

If one of the time fields has to be before or after a certain time,how do I limit this.

Any ideas where to look.I tried the search facility.

Thank you

David
 
Question 3 I found.

I had the wrong entry in the table validation rule.

Just the other two if possible please.

Thank you

David

:)
 
If you provide your email address I have a sample DB that stores time in and time out and does the calculations, maybe it can help you?

Joe Miller
joe.miller@flotech.net
 
Joe,

Thanks for that.I didn't expect so much.

Now though could I ask a couple of suplememtary questions.

Using your example,

How would you show Total Regular hours per day in hours minutes rather than hours/?hundredths.

Secondly. Is it possible to limit the duration between Morning Out and Afternoon In to be greater than 30 minutes.
It doesn't matter what I try I get an error(and I thought that part would be simple).

Thanks again,have a good weekend.:)

David





 
Why don't you check out this web page, it has a bunch of links for various date/time conversions.


As for the thirty minutes, just perform the same date calculation in the query to come up with a decimal for the difference between morning out and afternoon in. Pop up a messagebox if it's greater than .5

HTH Joe Miller
joe.miller@flotech.net
 
Found this thread too, might help:

Convertime a decimal time figure into a true time figure
thread705-122057 Joe Miller
joe.miller@flotech.net
 
Joe,

Thanks for the replies.
I've been looking at AccessWeb(just need to look harder)

Thank you

David

:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top