> At 11:25 AM 18-09-01 +0000, hannes@d... wrote:
>...
> >Age of persons in
> > computed (f_Year('TODAY') - f_year(BDate));
> >returns values like 24548 years :-)
--- In ib-support@y..., Helen Borrie <helebor@d...> wrote:
> Your variable 'BDate' should be a timestamp..
> ... select (cast('today' as date) - cast(:BDate as date))/365
> as Age_in_years from rdb$database
> ....
thank you Helen, the "cast('today' as date)" did the job!
BDate is a colum of datatype DATE
I am using now f_year(cast('today' as date) ) and everthing
works fine!
seems that the UDFs cannot handle datatype TIMESTAMP
it has to be DATE.
hannes hernler
--------------------------------------------------------
DWS - Delphi Web Script
developing professional web apps
look at http://www.dwscript.com
--------------------------------------------------------