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!

Timestamp difference in Minutes

862489Sep 8 2011 — edited Sep 8 2011
I am calculating and hence selecting the difference between the two timestamps in minutes by using the below query.

select (extract(second from intervl) / 60) +
extract(minute from intervl) + extract(hour from intervl) * 60 +
extract(day from intervl) * 60 * 24 DIFF_IN_MINS,mydate
from (select (timestamp2- timestamp1) intervl,maindate mydate
from mytable
where maindate between v_start_date AND v_end_date);


However in certain scenarios, i have the DIFF_IN_MINS value.. I want to retrieve(SELECT) the data from mytable with the DIFF_IN_MINS values

Pls could you suggest as how I can query and retrieve the data when I know the DIFF_IN_MINS value

Many Thanks in advance
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 6 2011
Added on Sep 8 2011
6 comments
5,589 views