Database Timestamp conversion error

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Mon Apr 9 21:09:26 CEST 2007


En Mon, 09 Apr 2007 11:42:33 -0300, <kyosohma at gmail.com> escribió:

> Here's my results:
>
> # bad
> <type 'DbiDate'>
> <DbiDate object at 0x0099D5F0>
>
> # good
> <type 'datetime.datetime'>
> datetime.datetime(2007, 4, 9, 0, 0)

You can convert a DbiDate object into a datetime object using:
dt = datetime.datetime.fromtimestamp(float(dbidate))
Only dates after 1970 are supported.


-- 
Gabriel Genellina




More information about the Python-list mailing list