Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AVERAGE SECONDS

Status
Not open for further replies.

Noah114

Technical User
Mar 31, 2005
59
US
I have a query that calculates the date diff in seconds and stores that in a make table. I have been researching the site on how to convert that time to hours, minutes, and seconds however my goal is to get the average seconds converted in that time. For example, say I had 3 people with times of 30 seconds, 45 seconds, and 119 seconds, I wouls to show the average time as 1:18 or whatever it would be. Please help, thanks
 
you could use the average within the queries along with the group by.

if you let me know the field names, and what field you are trying to group by to get the average figure then i could do the sql code for you..
 
SECONDS: DateDiff("s",[DELIVERY_DATA_CHANGE_DATE],[CHANGE_DATE])

is what calculates the seconds between intervalas and dupms it into a make table. For there I would like to take all of my records and break it up into averages?
 
you say you want to group 3 people together for instance, what other field makes these 3 people relate to each other. There would have to be another field i.e. department etc. Or are you using a date field.

What other field do you also create when you make the table?




 
Date field is [REFERRAL] My query has the Fields
REFERRAL
WEEKDAY
and then my Second formula
 
So you have a newly created table with 3 fields:
REFERRAL, WEEKDAY, SECONDS
and you want the average of SECONDS for all records ?
SELECT DateAdd("s", AVG([SECONDS]), 0) AS AverageTime
FROM yourNewlyCreatedTable;

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top