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!

how to store difference between two timestamps as a number????

965816Oct 3 2012 — edited Oct 3 2012
Hi
I've to find difference between 2 timestamp variables and the result should be stored as number in minutes??
like
declare
fir_timestamp timestamp(7):='01-jan-2012 13:30:00';
sec_timestamp timestamp(7):='01-jan-2012 14:00:00';
c number;
begin
c:=((sec_timestamp-fir_timestamp)/(24*60));
dbms_output.put_line(c);
end;
This post has been answered by jeneesh on Oct 3 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 31 2012
Added on Oct 3 2012
12 comments
850 views