ODBC module and strange date reference <...>

Frank Millman frank at chagford.com
Thu Mar 2 10:36:38 EST 2006


Diez B. Roggisch wrote:
> dananrg at yahoo.com wrote:
>
> > Sorry for the double-thanks Frank.
> >
> > I'm using Python 2.1 for Win32 and import datetime fails.
> >
> > Does the datetime module come standard with later releases of Python?
> > If so, which release? If not, will datetime with with Python 2.1, if it
> > will, where can I get it? I'm still such a newbie with Python that I'm
> > not even sure where in the directory structure modules go. My Python
> > reference books from Amazon.com are in the mail.
>
> I think datetime became available around 2.3. And it's a binary module, so
> chances are slim that you can backport it.
>
> However, what Frank suggested should work with module time. too:
>
> import time
> dat = time.localtime(int(dbidate_object))
>
> Diez

Yes, this works fine on my setup.

You can then use time.strftime() to format it into human-readable
output.

Frank




More information about the Python-list mailing list