Re: [cx-oracle-users] Timestamp datatype doesn't display fractions of a second
Brought to you by:
atuining
From: Anthony T. <an...@co...> - 2004-07-22 14:17:19
|
The __str__ method for the timestamp implementation of cx_Oracle does not include the fractional seconds. That doesn't mean that they are not actually there -- they are. Take a look at the documentation for the date object and you will see what I mean. I'd give you the information myself but right now I am on vacation and have limited access to a computer. Chris Dunscombe wrote: > Hi, > > I'm unable to get cx_Oracle to fully display an Oracle 9i Timestamp column: > > >>>>cur = db.cursor() >>>>cur.execute("select order_date from oe.orders where rownum < 2") > > [<TimestampVar object at 0x007EB260>] > >>>>print cur.description > > [('ORDER_DATE', <type 'TimestampVar'>, -1, 11, 0, 0, 0)] > >>>>data = cur.fetchall() >>>>print data[0][0] > > 1999-08-16 22:34:12 > >>>>type(data[0][0]) > > <type 'ExternalDateTimeVar'> > > As you can see the fractions of second aren't being displayed. > > Maybe there's a clue in that the column is actually being returned into an ExternalDateTimeVar > type not a TimestampVar defined by the cursor. This could easily be me jumping to conclusions. > > I'm running 4.0.1 on a 9.2 client on Windows against a 9.2.0.4 database on Linux. > > Thanks, > > Chris Dunscombe > > Reg > > > > > __________________________________ > Do you Yahoo!? > Yahoo! Mail - 50x more storage than other providers! > http://promotions.yahoo.com/new_mail > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users |