Re: Time calculation in sqlplus

From: Alex Filonov <afilonov_at_pro-ns.net>
Date: Mon, 04 Dec 2000 22:48:30 GMT
Message-ID: <90h6vt$pc5$1_at_nnrp1.deja.com>


(end_time - start_time) * 24 -- This is difference between start_time

  • and end time in hours (with fractures) to_char(trunc(sysdate) + (end_time - start_time), 'HH24:MI') -- prints difference in hours:minutes format.

Of course it would work only if you have start_time and end_time stored in date format.

In article <90fu1f$m7f$1_at_nnrp1.deja.com>,   cleans_tips_at_hotmail.com wrote:
> Hi
>
> I am working on employees attendance system. The main table logs
> in the start_time and end_time everyday for each employee. Now i want
> to calculate the difference between these two fields to achieves no of
> Hours/Minutes every employee has put in each day.
>
> Could somebody show the way to do this.
>
> Thanks
> Clement
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Mon Dec 04 2000 - 23:48:30 CET

Original text of this message