Calculate date and show exact minutes

R

Rocky

Thanks for your help!
I have 2 military time fields and am wishing to get the difference between
them and to have the result in minutes.

TotalTime: DateDiff("H",[Start Time],[End Time])

The result of this SQL does not result in exact minutes, as it returns 0
when the answer is really 30.

I'd like to see it return hr:min or even all minutes.
13:00-11:30 results in 1:30 (as in 1hr and 30mins or 90min)
 
D

Douglas J. Steele

TotalTime: DateDiff("n",[Start Time],[End Time])

To convert that to hours and minutes, use

TotalTime: DateDiff("n",[Start Time],[End Time]) \ 60 & ":" &
Format(DateDiff("n",[Start Time],[End Time]) Mod 60, "00")
 

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

Similar Threads


Top