|Subject||Re: [firebird-support] Re: date functions in FB|
>> > So adding a day would be as simple as:E.g. adding one year:
>> > Select MyDate + 1
>> > From MyTable;
>> > From there, you should be able to figure out the rest.
>> Adding years is not obvious at all. Years can contain different number
>> of days and there should be functions to handle that....Why the FB SQL
>> is so poor? I remember doing this with MS SQL very easily..
> Select (MyDate + (365.2525 * :NumOfYears)
> This will fail in CE 3000
> Come back to me then (or just before) and I'll give a suitable workaround.
SELECT (CAST('2004-1-10' AS DATE) + (365.2525 * 1)) FROM RDB$DATABASE;
SELECT (CAST('2003-12-10' AS DATE) + (365.2525 * 1)) FROM RDB$DATABASE;
Is this result what you expect ?