Time Calculations

P

Paul Overway

Assuming you are using a complete date and time in the field (which you
should be):

[ElapsedTime] = ([EndTime] - [StartTime]) * 24

The result will be in the form 25.0166666666628 . If you REALLY want the
format to be 25 hours 1 minute, you'll need to write a function.
 
S

Scott Rich

I have a table with fields named [StartTime] and [EndTime] and I'm running a
query to calculation the time between the start time and end time. However,
if the time is more than 24 hours the calculation resets, i.e., if the total
time was 25 hours and 1 minute the total returns 1 hour and 1 minute instead
of 25 hours and 1 minute. How can I calculate the time between the
StartTime and EndTime without the total hours resetting?

Thanks,

Scott Rich
 
D

Dale Fye

Take a look at the DateDiff() function. You have to indicate the
units you want to measure, the StartTime and EndTime. But if you are
only storing the time portion of the date/time you are going to have
problems.

--
HTH

Dale Fye


I have a table with fields named [StartTime] and [EndTime] and I'm
running a
query to calculation the time between the start time and end time.
However,
if the time is more than 24 hours the calculation resets, i.e., if the
total
time was 25 hours and 1 minute the total returns 1 hour and 1 minute
instead
of 25 hours and 1 minute. How can I calculate the time between the
StartTime and EndTime without the total hours resetting?

Thanks,

Scott Rich
 

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