Data Calculations questions

  • Thread starter Thread starter Nangel
  • Start date Start date
N

Nangel

I am creating a report in access. The report contains two
fields; Start time and end Time. I would like to subtract
the end time minus the start time to give the total number
of time between the two fields with the following format:
dd:hh:mm:ss

Please advise how to accomplish this. If this is not
possible in Access, Please provide information on the
different types of calculation capable of doing with a
date field.

Thank you in advance for your help!
 
Nangel

Access Date/Time fields store point-in-time data, not duration. Your
[StartTime] and [EndTime] fields, if Date/Time types, will be storing date
and time-of-day.

To sum up the total amount of time, you need to figure the difference in the
lowest unit of measure (looks like seconds from your example). Use the
DateDiff() function, with seconds as the unit of measure.

Now the real work begins ...! You'll need to parse seconds into days,
hours, minutes, and seconds for display as you described. Take a look at
the <mvps.org> website for some routines to help get you started.
 
Back
Top