this should get you on ths right track
for a float value
select (CURRENT_DATE - cast('15-feb-1972' as date)) / 365.25 from rdb$database;
for a simple integer value
select extract( year from CURRENT_DATE) - extract(year from cast('15-feb-1972' as date)) from rdb$database;
so your sql would look something like
select (CURRENT_DATE - you_date_field) / 365.25 as the_age from your_table
hope this helps.
Main Topics
Browse All Topics





by: DeesyPosted on 2003-06-09 at 12:31:30ID: 8684855
Is Stored Procedure ok for you?
Do you need Year or you need years, months, days?