G
Guest
Have Date/Time in & Date/Time out how do I show diff in Hrs in Query
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.

Steve Schapel said:Tina,
May I suggest a couple of minor adjustments to your expression:
- integer divisor \ rather than /
- typo "n" instead of "h"
- format so minutes less than 10 will show with leading 0
So...
ElapsedTime: DateDiff("n",[TimeInField],[TimeOutField])\60 & ":" &
Format(DateDiff("n",[TimeInField],[TimeOutField]) Mod 60,"00")
--
Steve Schapel, Microsoft Access MVP
hours only? or hours:minutes?
for hours only:
ElapsedTime: DateDiff("h", [TimeInField], [TimeOutField])
for hours:minutes:
ElapsedTime: DateDiff("n", [TimeInField], [TimeOutField])/60 & ":" &
DateDiff("h", [TimeInField], [TimeOutField]) Mod 60
(the above goes all on one line.)
hth
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.