Home  |  About  |   Search   

What's New
Table Of Contents
Credits
Netiquette
10 Commandments 
Bugs
Tables
Queries
Forms
Reports
Modules
APIs
Strings
Date/Time
General
Downloads
Resources
Search
Feedback
mvps.org

RunCommand Constants

Terms of Use


 

Date/Time: Determining Average Time

Author(s)
Robin Stoddart-Stones

   If you wish to format an 'Average time' from a table in a query it cannot be done all in one operation. However it can be done in two operations carried out in the same query.

    Create the average field which involves a renaming, then format that renamed field as an expression. eg: The query

SELECT test.user, Avg(test.Times) AS AvgOfTimes, Format([AvgOfTimes],"ShortTime") AS FormatTime FROM test GROUP BY test.user;

    groups a set of times into separate users, then averages each users times and formats that average as a 'short time' string.

    It seems to be quicker than extracting the average time and formatting it in a report individually.


1998-2009, Dev Ashish & Arvin Meyer, All rights reserved. Optimized for Microsoft Internet Explorer