Time Calculations on a Schedule

R

Rich Frazer

Have a schedule layout on a form with a "StartTime"
and "EndTime" text boxes based on Date/Time fields in a
table. I have TotalTime showing up just fine in an
unbound text box except when the EndTime is Midnight, for
example StartTime is 10:00 PM and EndTime is 12:00 AM
(Midnight), then TotalTime shows as as -22 hours (every
time of the day gives a negative result...). I've tried
using 11:59 PM, but that gives me 1.98 hours in TotalTime
and our payroll system only works with 15 minute
increments (.00, .25, .50, .75), so I can't use that. Any
suggestions on how to fix this? In EXCEL, one can just
use "24:00" for the "ending Midnight" (to give the formula
24:00-22:00=2 hours) on a date (as opposed to "0:00" for
the "begining Midnight" on a date), but Access only goes
as high as 23:59. Thanks in advance!
 
D

Dan Artuso

Hi,
You don't say how you're calculating your time, but try using DateDiff
if that's possible:
?DateDiff("h",#03-03-03 10:00 pm#,#03-04-03 12:00 am#)
2
 

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