08-11-2009 03:01 PM - edited 03-14-2019 04:27 AM
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
08-17-2009 05:34 AM
--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
08-17-2009 07:07 AM
Thank you for your help Paige!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide