Subject Re: [ib-support] COMPUTED FIELD BY SUBTRACTING TWO TIME FIELDS
Author Ali Gokcen
select cast('00:00' as time) + (cast('12:22' as time)  - cast('10:20' as time)) from rdb$database; 
 
it works.
 
but,
 
cast(  cast('12:22' as time)  - cast('10:20' as time)   as time)   not.
 
its returning  seconds. so, you can calculate it yourself too   
                       (firsttime-secondtime )/3600   is hour,
                    (int) (((firstime-secondtime)-(int(hour) * 3600) ) / 60)    is minute..
 
----- Original Message -----
From: Arnaldo
Sent: Sunday, January 28, 2001 10:43 AM
Subject: [ib-support] COMPUTED FIELD BY SUBTRACTING TWO TIME FIELDS

Hi all.
 
There is a way to subtract two fields ot type TIME in a computed fields?
 
I have 2 fields say: 'FIRSTHOUR' and a second 'SECONDHOUR':
 
if i do:
WHOUR = COMPUTED BY ( SECONDHOUR - FIRSTHOUR ) but i got a COMPUTED numeric field:
 
HOW EXTRACT TIME FROM THIS FIELD???
 
THANKS
 
Arnaldo


To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com