Re: substract DATE variables
From: Ian Wilkins <ianw_at_sensible.teleord.co.uk>
Date: 1996/10/07
Message-ID: <53avkj$f9l_at_sensible.teleord.co.uk>#1/1
>> I have a table with the following fields:
>> No_Item Number(5)
>> Time_Began Date
>> Time_Done Date
>>
>> I would like to get the time it takes, in average, to build an item. I need
>> it to be in minutes and seconds. However, I'm not able to substract 2 date
>> variables.
This is what I use to get the time taken between two dates:
Date: 1996/10/07
Message-ID: <53avkj$f9l_at_sensible.teleord.co.uk>#1/1
>Eric Pronovost wrote:
>> I have a table with the following fields:
>> No_Item Number(5)
>> Time_Began Date
>> Time_Done Date
>>
>> I would like to get the time it takes, in average, to build an item. I need
>> it to be in minutes and seconds. However, I'm not able to substract 2 date
>> variables.
This is what I use to get the time taken between two dates:
select
FLOOR((end_date - start_date) * 24 ) || ':' || FLOOR(MOD((end_date - start_date) * 24 * 60, 60)) || ':' || ROUND(MOD((end_date - start_date) * 24 * 60 * 60, 60)) "Elapsed"from my_table
Ian
*----------------------------------------------* * "Think for yourself - Question Authority" * * Dr. Timothy Leary (1920 - 1996) * *----------------------------------------------*Received on Mon Oct 07 1996 - 00:00:00 CEST