Oldest Contact / convOldestContact

Unanswered Question
Aug 11th, 2009
User Badges:

Hi Everyone

This may be considered out of scope for this forum, but I wondered if anyone might know:

In the realtime CSQsSummary Table (IPCC Database) how they've done the conversion to get from millisecs (oldest contact) to the HH:MM:SS format (convOldest Contact). I have a need to perform that same conversion in my Inova Wallboard software, as I cannot compare fields with string values. I'm grateful for any input.


Thanks,

Kelly

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4 (1 ratings)
Loading.
paiged Mon, 08/17/2009 - 05:34
User Badges:

--I think UCCX does it in the Crystal Templates.

--This is a SQL statement that will convert Seconds to HH:MM:SS string


--Declare variables

DECLARE

@sHHMMSS VARCHAR(15),

@nSeconds Int


--Set the starting value (this could also be retrieved from a select statement)

SELECT @nSeconds = 87200



SELECT @sHHMMSS =

RIGHT('00' + CONVERT(VARCHAR, FLOOR(@nSeconds/3600)), 2) + ':' +

RIGHT('00' + CONVERT(VARCHAR, FLOOR((@nSeconds % 3600)/60)), 2) + ':' +

RIGHT('00' + CONVERT(VARCHAR, FLOOR((@nSeconds % 60))), 2)


--Returns 24:13:20

PRINT @sHHMMSS



Actions

This Discussion