|
|
Re: Differerence between timestamp [message #262686 is a reply to message #262650] |
Tue, 28 August 2007 01:22 |
Arju
Messages: 1554 Registered: June 2007 Location: Dhaka,Bangladesh. Mobile:...
|
Senior Member |
|
|
Thank you Michel so much. It worked.
I want to add while experiment if date is different then add day and hours to get difference between two dates in minutes.
select extract(day from a-b)*24*60
+ extract (hour from a-b)*60
+ extract(minute from a-b)
+ extract(second from a-b)/60 min
from test;
Thank you Again.
[Updated on: Tue, 28 August 2007 01:24] by Moderator Report message to a moderator
|
|
|
Re: Differerence between timestamp [message #262690 is a reply to message #262686] |
Tue, 28 August 2007 01:28 |
|
Michel Cadot
Messages: 68718 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
Please take care of line length.
If you don't care about the subsecond data then it is easier to convert to date:
SQL> select &t1 t1, &t2 t2, (&t2+0)-(&t1+0) "DAY", ((&t2+0)-(&t1+0))*24*60 min
2 from dual;
T1 T2 DAY MIN
----------------------- ----------------------- ---------- ----------
28/08/2007 07:20:58.458 28/08/2007 07:48:54.955 .019398148 27.9333333
1 row selected.
Regards
Michel
|
|
|