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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Average Time from Record to Record?

Status
Not open for further replies.

GMAN33

IS-IT--Management
Dec 4, 2002
115
US
Hi Gang.

I have several hundred records, each with a Date/Time Stamp for when the record was created. I need to create a formula that gives me an average time summary from one record start time to the next record start time. I am just stuck on writing the formula. Using CR9 Pro

Thanks
Ed
 
order them by date and use the previous function ie

datediff("s", {table.date},previous({table.date})

Lisa
 
What is an Average between start times?

Perhaps you can supply some example data and expected output to help clarify. And will this be a running average, or just between each set of 2 records?

-k
 
Ahhh, that's probably it, Lisa, they want to know the difference in time, not an average.

-k
 
Thank you for the quick response

Here is what I have:

May 28, 2003 (Group 1)
Record 1......start time is 10:52:32AM
Record 2......start time is 11:22:06AM
Record 3......start time is 02:31:22PM
.
.
May 29, 2003 (Group 1)
Record 1......start time is 09:10:21AM
Record 2......start time is 12:09:37PM
.
.
so on and so on.

I would like to have an average time summary in hours/minutes between Record 1 and Record 2 than Record 2 and Record 3...and so on, than have at the end of group 1 and have average time like 3:10:22 (hours,minutes,seconds)

But then in the report footer have an overall average time, across all dates. This process can be several months so it would need to include (months:days:hours:minutes:seconds)

I hope this all makes sense. Thanks again for the always fantastic support.
Ed
 
Thanks again for all of the replies. Was I able to explain myself ok with this?

Lisa, would your suggestion do the trick? What does the "s" stand for? Seconds?

Thanks again to all
Ed
 
Yes, s stands for seconds..

However.. if you want the average over a group..

Why not

datediff("s",max(date,group),min(date,group))/count(date,group)

for avg in seconds.. then split that out into the groups..

I don't know how you will do months since "months" are not even time units...

Anyway this looks easier than adding up all the differences..

Lisa
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top