Calculating time difference

C

Cardian

I am rusty with Access and want to calculate the total time of an event. For
instance, if an event starts at 8:00 am and ends at 11:15 am, I want the
calculation to show 3 hrs, 15 min.

Is there a way to do this?

Thanks!
 
G

guy.jara

I am rusty with Access and want to calculate the total time of an event. For
instance, if an event starts at 8:00 am and ends at 11:15 am, I want the
calculation to show 3 hrs, 15 min.

Is there a way to do this?

Thanks!

Cardian,

Check out the "DateDiff" function. That should give you what you need.
 
P

pietlinden

I am rusty with Access and want to calculate the total time of an event. For
instance, if an event starts at 8:00 am and ends at 11:15 am, I want the
calculation to show 3 hrs, 15 min.

Is there a way to do this?

Thanks!

write a function to format it for you.

use DateDiff("n",StartTime,StopTime)
and then use integer division to get hours and then use MOD 60 to get
minutes. then format all that junk.
 

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