I managed to substract Created Time from Resolved Time and it shows me the time elapsed since the request was created until the technician solved it.
This is the sql interrogation:
SELECT ti.FIRST_NAME "Technician", round((((wo.RESOLVEDTIME/1000)/60)) % 60) - round((((wo.CREATEDTIME/1000)/60)) % 60) as "time to resolve" FROM WorkOrder wo 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')
But this works only for the same day. I need to find a function to substract the created time from resolved time even when the day differs.
(e.g if Created Time is : JUN 6, 2013 1:13 PM, Resolved time is : JUN 7, 2013 1:13 I want to show the difference 1 day ( in minutes ) not 0. )
And I want to convert this difference into a time value; i mean if is greater than 60 to show me 1 hour and minutes...