MS Access Question

Hiroyuki Tamura
Hiroyuki Tamura used Ask the Experts™
on
How do I calculate total minutes on query? Screenshot1.jpg
I don't know how to set format
Screenshot1.jpgnot sure if it is hour or minutes
Screenshot1.jpg
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2015
Distinguished Expert 2018
Commented:
It is neither, it is days. So multiply with 24 * 60 to get minutes.

/gustav
Distinguished Expert 2017
Commented:
The DateTime field is intended to show a point in time so using that data type for elapsed time can be very confusing.  The list you are showing is actually parts of a day.  The integer part of the double would be the number of days since 12/30/1899 and the decimal part is the number of milliseconds (maybe) since midnight.  So - .53 would be just after noon - about halfway through the day

Using Gus' method, you would sum and then multiply.  However, you could use the Format() function to extract minutes and then sum the minutes.  Gus' method would be more accurate because you would only be losing the fraction of the last minute whereas converting each item would result in a round up or down for each detail item.  It really depends on what you need.  Or you could convert to seconds and then do your own division by 60 to get minutes and a fraction.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial