calculate how many hours between calling date and current date in pl / sql [closed]

1

I need to make a query that brings the calls that are outside the SLA for 48 hours calculating the dates and times of the call's opening and current date, can anyone help me?

    
asked by anonymous 31.05.2016 / 02:25

2 answers

0

Friend, you can use DATEDIFF ( link ).

You can also use the approaches suggested in this SOEN post: link .

Once you find the difference between the dates, simply restrict those whose value is greater than 48 hours in your case.

    
31.05.2016 / 02:38
0

Subtracting two dates in Oracle results in the difference in days (or fraction), to know in hours, multiply by 24.

Something like.

Select ...
From tabela
Where ...
And (datachamado - sysdate) * 24 >= 48
...
    
31.05.2016 / 02:51