|
Posted by markc600 on 04/18/06 11:07
Rather than using CONVERT, you can get the number
of hours, minutes and seconds using this
Hours = OutgoingCallDuration / 3600
Mins = (OutgoingCallDuration % 3600) / 60
Seconds = OutgoingCallDuration % 60
Your statement will end up like this
RIGHT('00'+CAST((SUM(ISNULL(Calls.OutgoingCallDuration,0))/3600) AS
VARCHAR(2)),2) +
RIGHT('00'+CAST(((SUM(ISNULL(Calls.OutgoingCallDuration,0)) % 3600) /
60) AS VARCHAR(2)),2) +
RIGHT('00'+CAST((SUM(ISNULL(Calls.OutgoingCallDuration,0)) % 60) AS
VARCHAR(2)),2)
You may find it more efficient to do this in your front end
[Back to original message]
|