get total hours

  • Thread starter Thread starter wb
  • Start date Start date
W

wb

I am trying to fill in a statistical section on a form. I have a starting
time and ending time that are both formatted medium times.

I want to subtract end from start and get a total hours. Can someone help
with this calculation?

WB
 
Below, 'x' equals # of hours elapsed since midnight:

x = DateDiff("h", Date(), Now())

Usually the DateDiff() function isn't enough by itself
because the actual requirement is to exclude weekends,
holidays, and non-office hours from the result. That's
where some fancy coding is required. Good luck.
 
Hello,

How is the issue going on your side? Does Elwin's suggestion meets your
requirements? Let us know if you need further assistance on this issue.

Regards,

Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Back
Top