[DB-SIG] informixdb module problem

Anthony M. Ingraldi A.M.INGRALDI@larc.nasa.gov
Fri, 2 Oct 1998 09:22:14 -0400


Hello,

I am having some difficulty with DATE data and the informixdb module.  The
following example illustrates the problem

>>> cursor.execute("insert into table_name (a_date) values ('10/2/98')")
1
>>> cursor.execute("select a_date from table_name where a_date='10/2/98'")
>>> res = cursor.fetchall()
>>> res
[(<DbiDate object at eeb68>,)]
>>> str(res[0][0])
'Wed Dec 31 18:59:59 1969'


DbiDate objects are not behaving properly or I'm not using them correctly.
In the above example the date field was properly inserted and yet the
value returned via the DbiDate object is incorrect.

I am using python 1.5.1 with the Release 1.01 of the informixdb
module dated 1997-03-11.  Running on a Solaris 2.6 system.

--
  Tony Ingraldi                | e-mail: A.M.INGRALDI@LaRC.NASA.GOV 
  NASA Langley Research Center |                                     
  Mail Stop 267                | Phone : (757) 864-3039             
  Hampton, VA  23681-2199      | Fax   : (757) 864-7892