Re: help, "02/29/00" - invalid day in date?
Posted in 1995
Topics: Stored Procedures & SPL, Migration, Import/Export & Data Conversion
> Everything works fine, except there are a few DATE fields which have > the vlue "02/29/00", that is, Feb. 29, 2000. This *is* a valid date, > but Informix bombs out saying that I have an "invalid day in date". > > I'm assuming that this is because of the leap-year thing; I've been > looking over the books, but the most I can find is that "xx/xx/00" may > default to 1900, not 2000. This is in fact not important to me, because > I am only displaying the date in "mm/dd/yy" format. Anyway, 2/29/1900 > was a leap-day, too. Brian, First, 2/29/1900 is NOT a leap-day. A year is a leap year if it is divisible by 4 but NOT BY 100, unless it is divisible by 400. So, 1900 is not a leap year - it is divisible by 4 but is also divisible by 100 and not 400 (which disqualifies it). 2000 IS a leap year because it is divisible by 4 and 400, even though it is also divisible by 100. If you can't unload the century in your dates, look at the DBDATE environment variable. That may help. If not, unloading with a century or editing the file with something like sed may be your only option. Informix does not know whether you mean 1900 or 2000 (or 2100 or 1800). Joe