Subject SV: [firebird-support] Unable to get F_AGEINDAYS function to work
Author Svein Erling Tysvær
>I am trying to get the F_AGEINDAYS function to work without any success.
>
>select TOTSOLD_PRODUCT, TOTSOLD_QTYSOLD, F_AGEINDAYS(TOTSOLD_SOLDDATE, TOTSOLD_LISTDATE) as roi_days from TOTAL_SALES;

If you're using Firebird 2.1 or more recent, DATEDIFF is an alternative. Better, if your fields are DATE fields (dialect 3), you can simply use:

select TOTSOLD_PRODUCT, TOTSOLD_QTYSOLD, TOTSOLD_LISTDATE - TOTSOLD_SOLDDATE as roi_days from TOTAL_SALES;

HTH,
Set