title: How to get the difference between execution start time and execution end time in plsql
body: <p>How to get the difference between execution start time and execution end time in plsql.</p>
  
  <pre><code>  SET SERVEROUTPUT ON;
  DECLARE
    l_start_time DATE :=sysdate +1;
    l_end_time DATE   := SYSDATE;
    to_hours DATE;
  BEGIN
    dbms_output.put_line(l_start_time);
    dbms_output.put_line(l_end_time);
    TO_HOURS:=TO_CHAR(L_END_TIME - to_date(L_START_TIME,'HH24:MI:SS'));
    dbms_output.put_line (TO_HOURS);
  END ;
  </code></pre>
  
  <p>I need the execution time difference and the output to be in <code>HH:MI:SS</code>.</p>