PureConnect

 View Only

Discussion Thread View
  • 1.  callDetail_viw

    Posted 06-22-2021 04:12
    hey community

    I was trying to build customization report on sql using callDetail_viw everything was going good until i saw the TConnected parameter , this parameter is calculated by millisecond I have tried to convert it to this formula (hh:mm:ss) but there is discrepancy between my result and the system result , does any one know how the system calculated it ????


    thanks in advance for any help or tips
    #ArchitectureandDesign
    #AskMeAnything(AMA)

    ------------------------------
    Mohannad haddad
    Fourth Dimension Systems Company
    ------------------------------


  • 2.  RE: callDetail_viw

    Posted 06-23-2021 12:25

    Hi Mohannad - The calldetail_viw on my db does not contain the [tConnected] field, but it does exist in the InteractionSummary table.

    I am able to convert to hh:mm:ss using CONVERT(TIME, DATEADD(MILLISECOND, [tConnected] + 86400000, 0), 114) with no discrepancy from system result.

    HTH



    ------------------------------
    Raymond Hicks
    Sutter Health
    ------------------------------



  • 3.  RE: callDetail_viw

    Posted 06-23-2021 13:14
    My [calldetail_viw] doesn't have a tconnected column but it does have several columns that report in milliseconds. It also has a column called CallDurationSeconds. Here is the code to convert seconds and milliseconds to HH:MM:SS. Or you could also do this in excel if you just run the query and do the conversion in excel. 

    If you want to convert in Excel for MS =  Cell with milliseconds  (A2) / 1000 / 86400 and then right click format cell as Custom [H]:MM:SS
    or if for seconds in Excel for Seconds =  Cell with Seconds (A2) / 86400 and then right click format cell as Custom [H]:MM:SS

    In SQL these both work; you will need to change the name of the column in bold below to your column name. 
    ISNULL(CAST(NULLIF(DATEDIFF(DAY, 0, DATEADD(MILLISECOND, [tQueueWait], 0)), 0) AS varchar(3)) + ' days ', '') + CONVERT(varchar(8), DATEADD(MILLISECOND, [tQueueWait], 0), 8) AS QueueWait

    CONVERT(time(0), DATEADD(SECOND, [CallDurationSeconds], 0)) as CallDuration

    ------------------------------
    Brad Goff
    Palo Alto Networks, Inc.
    ------------------------------



Need Help finding something?

Check out the Genesys Knowledge Network - your all-in-one access point for Genesys resources