Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Substracting two timestamp values
Hi,
Can anyone help me with getting a resonable value when subtracting two
timestamps??
I'm using the AUD$ table and I wan to get the amount of time the session
lasted so I'm taking the logoff tiem and subtracting it from the time
stampstamp, both are datetime values. Unfortunately I can't seem to get
seconds and minutes out of the result.
For Example:
SELECT
to_char(SYS.AUD$.LOGOFF$TIME,'hh:mm:ss'),
to_char(SYS.AUD$.TIMESTAMP,'hh:mm:ss'),
(SYS.AUD$.LOGOFF$TIME - SYS.AUD$.TIMESTAMP) SessionTime
FROM SYS.AUD$
WHERE SYS.AUD$.TIMESTAMP>'15-AUG-97'
I would appreciate any thoughts!!
Thanks,
Bob
Received on Fri Aug 15 1997 - 00:00:00 CDT