Re: [cx-oracle-users] Timestamp datatype doesn't display fractions of a second
Brought to you by:
atuining
From: Chris D. <cdu...@ya...> - 2004-07-26 16:33:47
|
Anthony, Thanks for that, I can now get the fsecond data. Is there another way to get the full timestamp data, as a string, apart from: fullTimestamp = str(timestampCol) + "." + str(timestampCol.fsecond) where timestampCol is a TimestampVar object returned from a cursor. Thanks, Chris PS This can wait so enjoy your holiday --- Anthony Tuininga <an...@co...> wrote: > 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 > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |