Re: odbc DbiDate date conversion
- From: flupke <flupke@xxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 26 Sep 2006 14:42:39 GMT
Frank Millman schreef:
flupke wrote:
I'm using a solid DB and i'm accessing it via the odbc module
(activepython).
I get a DbiDate object returned but i don't find a way to decently print
it or get a format like %d/%m%/%y.
I convert it to a datetime() instance, like this -
mydate = datetime.datetime.fromtimestamp(int(dbidate))
Then I can use all the functionality of the datetime module.
HTH
Frank Millman
Hi Frank,
i tried it and i end up with this:
Traceback (most recent call last):mydate = datetime.datetime.fromtimestamp(int(birthd))
File "<stdin>", line 1, in ?
ValueError: timestamp out of range for platform localtime()/gmtime()
function
Regards,
Benedict
.
- Follow-Ups:
- Re: odbc DbiDate date conversion
- From: flupke
- Re: odbc DbiDate date conversion
- From: Frank Millman
- Re: odbc DbiDate date conversion
- References:
- odbc DbiDate date conversion
- From: flupke
- Re: odbc DbiDate date conversion
- From: Frank Millman
- odbc DbiDate date conversion
- Prev by Date: Re: ultra newbie question (don't laugh)
- Next by Date: Re: Remap Mysql tuple to dictionary
- Previous by thread: Re: odbc DbiDate date conversion
- Next by thread: Re: odbc DbiDate date conversion
- Index(es):