From: Bradley F. <br...@re...> - 2005-09-08 16:24:15
|
Dave: I've been working with the Sybase module (latest version) and have run = into a snag in dealing with very precise datetime values. In my case, I = need to preserve a Full datetime value **including milliseconds** and pass it on = to the database. I'm using the following code: sSubmit =3D str(datetime.datetime.now()) dtSubmit =3D Sybase.datetime(sSubmit) This produces a DateTimeType object, but the msecond value is always = zero. It seems to get everything else correctly It seemed like a silly parsing bug, so I tried a work around, grabbing = the milliseconds myself and trying to set them with: dtSubmit.msecond =3D 349499 (whatever) But this turned into a "TypeError: readonly attribute" exception So now I'm stuck. Have you or anyone else got a workaround .... Or a = quick fix? Is there a non-string way of creating a DateTimeType? Don't see anything else in the docs. Many thanks in advance! *Bradley |