Re: Date problem
Posted in 1997
Amita Shrivastava wrote: > > Hi > > I have a very funny problem. I have an application in ESQL/C which prints a > report. This report has a date column. While executing here, the program > retreives the date from the table and prints it. But at Customer site, the > date column is always blank. They have suggested we use char(9) for all date > fields in our tables. But this is rediculous. Can anyone tell me where the > problem is. Informix versions at our site and on-site is 5.x online.ESQL/C > version is 5.05. > > Please help > > Thanks > > Amita Since I've worked on this version of EC, I'll give it my best guess. I don't know that it matters any, but is the colum defined as date or datetime? I am more familiar with "date", which I believed (I am 100% sure of this in older versions of Standard Engine) is stored as the number of days since 1900. If you don't see anything and there's nothing wrong with your ?printf or whatever output routine your using, then I'd guess it's a NULL value. I'm sure you're aware of checking for NULL values with indicator variables, but just in case: $ SELECT the_date INTO :f_the_date:i_f_the_date FROM.... if (i_f_the_date == 0)...... - Dan Wright danwright@bigfoot.com First, verify that the date column is not