cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
473
Views
4
Helpful
2
Replies

Oldest Contact / convOldestContact

Googi1974
Level 1
Level 1

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

2 Replies 2

paiged
Level 1
Level 1

--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

Thank you for your help Paige!