Re: Date field problem --- old version
Posted in 1998
Topics: SQL Development & Query Writing, Migration, Import/Export & Data Conversion, Platform-Specific Issues
Jay Aymond (jay@ulife.com) wrote: : I have a user that is running Informix SE 2.10 on AIX --- I know this is a very : old version. : Some of the rows in this table have invalid data in the date fields --- I don't : know how it got there. When I use the "unload to "xxx" select * from : table_name" command, I get a "Error 1210 - Date cannot be converted to MDY : format". : Is there some way I can avoid getting this error? : Is there some way I can update the rows with bad dates to another valid value? : Is there some undocumented function on the select statement that I can use? : If I have to read the ".dat" with an external program, how is the date field : formatted? I Don't know if this is true for 2.10 but: Informix stores the dates as days offset from 1899-12-31 (which = 0) Depending on the dates you have in that table it should be between 1 and today or your highest date doing a select with a where clause of where thedate between 1 and your_highest_date will give the records with a correct date. -- Rene de Zwart