Report for Creation to Resolution Time Elapsed

Report for Creation to Resolution Time Elapsed

Hello,

I'm running ServiceDesk plus 9.2 build 9225 with PostGreSQL and need a report that shows the amount of time a ticket has been open from it's creation to resolution taking business hrs into consideration. Here is what I have so far:

SELECT wo.WORKORDERID "Request ID",
wo.TITLE "Subject",
aau.FIRST_NAME "Requester",
ti.FIRST_NAME "Technician",
LONGTODATE(wo.CREATEDTIME) "Created Time",
LONGTODATE(wo.RESOLVEDTIME) "Resolved Date",
case when (wo.resolvedtime=0 ) then null else TO_CHAR(((wo.resolvedtime-wo.createdtime)/1000 || ' second')::interval, 'HH24:MI:SS') end "Resolved Date - Created Date" FROM WorkOrder wo LEFT JOIN SDUser sdu ON wo.REQUESTERID=sdu.USERID 
LEFT JOIN AaaUser aau ON sdu.USERID=aau.USER_ID 
LEFT JOIN WorkOrderStates wos ON wo.WORKORDERID=wos.WORKORDERID 
LEFT JOIN SDUser td ON wos.OWNERID=td.USERID 
LEFT JOIN AaaUser ti ON td.USERID=ti.USER_ID WHERE (wo.ISPARENT='1')

Thank you!
                New to ADManager Plus?

                  New to ADSelfService Plus?