Subject | Re: Add Year function |
---|---|
Author | Svein Erling Tysvær |
Post date | 2006-04-13T19:32:35Z |
--- In firebird-support@yahoogroups.com, "Adam" wrote:
whereas 2000 was. Hence, there should be no problem adding 100 years
to his dates, but it would be interesting to learn what values were
put into Firebird if the Access database had entries with 29 Feb
2000.
Set
> > The reason I need to add 100 years is I exported data from MSIt's the other way around, Adam, the year 1900 was not a leap year,
> > Access 2 to Firebird. I found some of the date were not Y2K
> > compliant, eg. 04/06/2001 became 04/06/1901.
> >
> > So I need to convert them by adding 100 years into the data.
> > If the date is less than 1910 after export I found these need to
> > be added by 100 years, that's why I need the update statement.
>
> OK, well you can just add the appropriate number of days.
>
> For dates >= 1 Mar 1900, simply add 36525
> For dates <= 28 Feb 1900, simply add 36524
>
> For the date 29 Feb 1900, there is no corresponding day (you are
> stuffed in this case). 1900 is a leap year but 2000 was not.
whereas 2000 was. Hence, there should be no problem adding 100 years
to his dates, but it would be interesting to learn what values were
put into Firebird if the Access database had entries with 29 Feb
2000.
Set