October 25, 2013 at 3:30 pm
Hi,
I am counting values from database like
Total Calls Made:0:53:29 , Total Calls Received:0:11:25 , Total Call Duration:1:4:54
Total Calls Made:43 , Total Calls Received:5 , Total Call Duration:1:4:54
here how to calculate Average Time Duration:
Total Time Duration / (Total Calls Made + Total Calls Received)
(1995 +20214) / (43+5 )
How can we calculate the Average time(In hrs:mm:ss)
How can we calculate the Average time.
Thanks
October 25, 2013 at 4:20 pm
Your formula seems correct but you don't have number or calls made or received, instead you have duration of them. Check your data and post again.:-)
December 12, 2013 at 5:33 pm
To calculate "average duration", convert the duration for each record to milliseconds, then average the number of milliseconds for the group. Once you have that, then add that to a "zero" date and format it as time. In this example, the average milliseconds is the "12345" value:
SELECT CONVERT(VARCHAR(12), DATEADD(MILLISECOND, 12345, 0), 14) AS Duration
Duration
------------
00:00:12:347
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy