Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Analysis Server and Reporting Services (2008)
 Converting Time to a number and then multiplying

Author  Topic 

jbrown7232
Starting Member

22 Posts

Posted - 2011-06-01 : 12:42:50
Hello I have a column called Average Queue Time in which has a time format of HH:MM:SS. I also have a column called Calls Presented in which is a number. I need find the average total of the Average Queue Time.

SO I think I need to convert the Average Queue Time to a number and then multiply that by Calls Presented and then take that value and convert into time.

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2011-06-01 : 12:45:39
Probably easiest to convert to seconds using datediff(ss,0,dte) and then do a dateadd after the calculation.
Might need to use bigint or decimal depending on the values.

==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -