RE: Errors from Informix to SQL7
Posted in 2000
Not often I have the guts to contradict my superiors but I thought it was an integer number of days since December 31 1899. Not 1979 (Hence DATE(0) = '31/12/1899') The only special thing about 31 December 1979 is that thats about when Obnoxio celebrated his 40th birthday. -----Original Message----- From: Art S. Kagel [mailto:kagel@bloomberg.net] Sent: 28 July 2000 15:52 To: informix-list@iiug.org Subject: Re: Errors from Informix to SQL7 Informix date columns are encoded as the integer number of days since December 31, 1979 while I'd guess that SQL Server uses MS dates which are number of secs since some other date. If you do not change the default binding Informix will return the internal representation which will not be a valid date on writing it to SQL Server. Try rebinding the column to a string, Informix will convert it to "mm/dd/yyyy" which SQL Server will likely accept. Art S. Kagel smccreadie@my-deja.com wrote: > > Trying to import data from Informix 7 to SQL7 Server using the Informix > 2.80 32-bit ODBC. The imports work OK if their are no date fields. If > the query includes date fields, the import tool on SQL (DTS) gives me a > DirectCopyXForm error for the first row and the import dies. > > I think I need to use a CAST or CONVERT statement on these date > fields. Am I on the right path and how do I do it? This is my first > attempt at working with Informix. > > Sent via Deja.com http://www.deja.com/ > Before you buy.