Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Time diff
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