Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Compute difference between timestamps

Re: Compute difference between timestamps

From: Mladen Gogala <gogala_at_sbcglobal.net>
Date: Sun, 04 Jun 2006 05:45:30 GMT
Message-ID: <pan.2006.06.04.05.45.32.641720@sbcglobal.net>


On Sat, 03 Jun 2006 11:06:51 -0700, c8s3dw wrote:

> In Oracle database, given two timestamp columns, how do I compute the
> difference, expressed in seconds, to three decimal places? i.e. 452.936

By converting them to date with to_date function and then multiplying by the number of seconds in the normal day. Under certain circumstances, day can have 23 or 25 hours. You don't want one of those days.

-- 
http://www.mgogala.com
Received on Sun Jun 04 2006 - 00:45:30 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US