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.
| Author |
Topic |
|
decem
Starting Member
21 Posts |
Posted - 2004-04-29 : 14:16:30
|
| case when (QLength - NumCallAbandoneInQ) = 0 then 0else CAST ((CAST (BeforeAnswerDuration as numeric (6,2)) / (CAST (QLength as numeric (6,2)) - CAST (NumCallAbandoneInQ as numeric (6,2))) / 60 ) as numeric (6,2)) end as [Avg_Wait_Time_AnsweredCalls],qlength, numcallabandoneinq and beforeanswerduration return the number of seconds, which is fine. but i want avg_wait_time_answeredcalls to be in minutes (mm:ss). right now i have it dividing by 60 but this gives 2.5 for 150 seconds instead of 2:30 as i would like it to. how can i make it return as mm:ss? |
|
|
ditch
Master Smack Fu Yak Hacker
1466 Posts |
Posted - 2004-04-29 : 15:11:36
|
| You can use moduloselect 5 % 4returns 1 ie 1 remainder 1so if the remainder of the division (%) is 0.5 then 0.5 * 60 = 30Duane. |
 |
|
|
|
|
|