q: data type datetime question ?
Posted in 2000
Topics: Data Types & Schema Design
sir, how is informix store datetime field ? is millisec part of datetime field ? thanks in advance ted chyn(tedchyn@yahoo.com) Sent via Deja.com http://www.deja.com/ Before you buy.
Under the covers, it's a decimal, I believe. You can define up to 5 decimal places (datetime year to fraction(5)). Using fractions of a second are somewhat dependant on the operating system; in 4GL sometimes fractions always come back as .00000 because certain math libraries are required. -- <html> =======================================================<br> Dennis J. Pimple <b>Inform<font color="#FF0000"><i>i</font></i><font color="#0000FF">x</font></b><font color="#000000"> Software, Inc.<br> Principal Consultant 6300 S Syracuse Way Ste 205<br> dennisp@informix.com Englewood CO 80111<br> office: 303-850-0210 <br> direct: 303-740-5611 Opinions expressed are mine,<br> fax: 303-779-4025 and do not necessarily<br> reflect those of my employer<br> <br> <a href="http://www.informix.com/" eudora="autourl">http://www.informix.com</a> </font></html> <tedchyn@yahoo.com> wrote in message news:88cdsf$v5a$1@nnrp1.deja.com... > sir, how is informix store datetime field ? is millisec part of datetime > field ? > thanks in advance > ted chyn(tedchyn@yahoo.com) > > > Sent via Deja.com http://www.deja.com/ > Before you buy.
tedchyn@yahoo.com wrote: > > sir, how is informix store datetime field ? is millisec part of datetime > field ? When you define the DATETIME column you specify the resolutiion and preceision. The maximum is: DATETIME YEAR TO FRACTION(5) which will hold 5 decimal digits of precision (1/100000 sec). HOWEVER, if the ONCONFIG parameter USEOSTIME is set off (0) engine and SQL functions will return times to the nearest second only. If USEOSTIME is set on (1) then the precision of these functions is OS and hardware dependent and rately exceeds 1/1000 sec. If you have higher precision time sources then DATETIME will store the results. -- Art S. Kagel & Family kagel@erols.com