Home  |   French  |   About  |   Search  | mvps.org  

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

In Memoriam

Terms of Use


VB Petition

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-2010, Dev Ashish & Arvin Meyer, All rights reserved. Optimized for Microsoft Internet Explorer