Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

get difference between two dates in seconds

user5716448Aug 1 2017 — edited Aug 1 2017

Hi,

Have table with two dates start and end date no supplies received for 31/07/2017 and credits for 30/07/2017


dates similar to start date 13/08/2015 01:30:51                 end date          13/08/2015 01:31:07

How can we get the difference in seconds between these dates i.e. 16 seconds

Tried EXTRACT(SECOND FROM NUMTODSINTERVAL(end_date - start_date , 'SECOND')) but got 0.000185185

using oracle 11.2.0.3

Thanks

This post has been answered by Gaz in Oz on Aug 1 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 29 2017
Added on Aug 1 2017
4 comments
38,695 views