| Subject | R: [ib-support] COMPUTED FIELD BY SUBTRACTING TWO TIME FIELDS | 
|---|---|
| Author | Arnaldo | 
| Post date | 2001-01-28T18:36:35Z | 
Solved. Thanks to Ali Gokcen. 
Your reply is a full understand to me. 
this line:
select cast('00:00' as 
time) + (cast('12:22' as time)  - cast('10:20' as time)) from 
rdb$database;  
seems don't work in computed fields so 
I have set up a Stored Procedure and seem 
all woks fine.
again thanks Ali.
Arnaldo 
----- Original Message -----From: Ali GokcenSent: Sunday, January 28, 2001 2:48 PMSubject: Re: [ib-support] COMPUTED FIELD BY SUBTRACTING TWO TIME FIELDSselect 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: ArnaldoSent: Sunday, January 28, 2001 10:43 AMSubject: [ib-support] COMPUTED FIELD BY SUBTRACTING TWO TIME FIELDSHi 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???THANKSArnaldo
To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com
To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com