Re: Inserting into a date field.
Posted in 1997
Terron Wright wrote: > > I am trying to insert data into a date field and I have not been able to > figure out the correct string for inserting 10/01/97. I have tried > 100197 and when I do a select it comes out at July 15, 4558. I can today > and it puts in today date correctly. Does anyone have a solution. I'm betting 7/15/4558 is 100,197 days from 01/01/1900, which is day 0 for dates. Try "100197", or "10/01/97", or best of all "10/01/1997"; just make sure you enclose the string in quotes so the engine knows not to treat it like a number (if you try 10/01/97 without the quotes, you're inserting 10 divided by 1 divided by 97). -- //////////////// ======================================================= ////////// // Dennis J. Pimple Informix Software, Inc. ////// / /// Principal Consultant 5299 DTC Blvd Suite 740 ///// // //// dennisp@informix.com Englewood CO 80111 //// // ///// /// // ////// recept: 303-850-0210 // // /////// direct: 303-740-5611 Opinions expressed are mine, / /////////// fax: 303-843-6408 and do not necessarily //////////////// http://www.informix.com reflect those of my employer