Subject Re: Add Year function
Author Svein Erling Tysvær
There is no danger in doing

UPDATE MyTable
SET MyDate = MyDate + 36524
WHERE MyDate < '1.3.1900'

followed by

UPDATE MyTable
SET MyDate = MyDate + 36525
WHERE MyDate BETWEEN '1.3.1900' AND '31.12.1909'

that is, unless the dates around 1900 actually are correct in some
cases (like updating a column DateOfBirth may be risky).

Though you could go back to your original database, and try to find
out why the dates were exported without century, certainly Firebird
wouldn't read '28.02.2000' as if it were 100 years earlier, whereas
'28.02.00' is a more ambiguous "date".

Others will have to answer your UDF question,
Set

--- In firebird-support@yahoogroups.com, "alanpltse" wrote:
> Hi,
>
> I just not sure what should I do to add 100 year to the some records
> now.
>
> Can I use something like ExtractYear from the date field, if it is <
> 1910 then I add 100 to the year part? I am afraid of if I add the
> 365xx number to it will cause any incorrect output.
>
> And back to my original problem: UDF, any hints what I did wrong ?
>
> Thanks