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: Time diff

Re: Time diff

From: Rauf Sarwar <rs_arwar_at_hotmail.com>
Date: 3 May 2005 10:31:08 -0700
Message-ID: <1115141468.736661.205830@o13g2000cwo.googlegroups.com>

Eugene wrote:
> Hi all,
> I have two columns representing start_datetime and end_datetime. They
> look like 1085008980 and 1085009504 respectively. They are stored in
> UTC format (number of seconds from '15/12/1970').
> How do I calculate difference in hours:minutes:seconds?
>
> Thanks,
> Eugene

Requires simple math to return this from a plsql function as 'HH:MI:SS'.

Hours := floor(524/3600) = 0
Minutes := floor((524 - (3600 * Hours))/60) = 8 Seconds := floor(524 - ((3600 * Hours) + (60 * Minutes))) = 44

Regards
/Rauf Received on Tue May 03 2005 - 12:31:08 CDT

Original text of this message

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