How to find the exact hrs,min,sec difference between two dates

Function Get_time_Difference(v_Date1 in Date, V_date2 in Date) RETURN VARCHAR2
IS
  V_date_diff NUMBER;
  v_hours  Varchar2(10);
  v_min    Varchar2(5);
  v_sec    Varchar2(5);
  Begin
  v_date_diff:= abs(v_Date1-v_Date2)*24*60*60;
  v_hours:=FLOOR(v_date_diff/3600);

   v_min:=FLOOR(((v_date_diff)-Floor((v_date_diff)/3600)*3600)/60);

   v_sec:=ROUND(((v_date_diff)-FLOOR((v_date_diff)/3600)*3600
      -(FLOOR(((v_date_diff)-FLOOR((v_date_diff)/3600)*3600)/60)*60)));
   RETURN v_hours||':'||v_min||':'||v_sec;
end Get_time_difference;

Have a Oracle Question
Do you have an Oracle Question?

Oracle Books
Oracle Certification, Database Administration, SQL, Application, Programming Reference Books

Oracle Application
Oracle Application Hints and Tips

Oracle Home
Oracle Database, SQL, Application, Programming Tips

All the site contents are Copyright © www.erpgreat.com and the content authors. All rights reserved.
All product names are trademarks of their respective companies.
The site www.erpgreat.com is not affiliated with or endorsed by any company listed at this site.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
 The content on this site may not be reproduced or redistributed without the express written permission of
www.erpgreat.com or the content authors.