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

Average Times

Status
Not open for further replies.

mwake

Programmer
Feb 12, 2004
151
US
I am using CR2011 with a SQL Server database as my data source. I am trying to come up with an average response time per week, but have run into problems. I created a formula called Response Time to calculate the difference between order date/time and arrival date/time (DateDiff("n", {@Order Date}, {Haillogs.Date}). The Order Date formula adds 7 hours to the order date because of time zone differences in date/time fields. I can't use the average summary function on the @Response Time formula because there are more than 1 record for each order, which makes the denominator too big. However, when I tried summing the Response Time formula then dividing by my @Session ID field, I come up with odd numbers because the sum of @Response Time is numeric and not date/time. How do I get a group average of time when I cannot divide by the sum by the number of records within the group??
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top