Python ADO Date Time database fields

goldtech goldtech at
Fri Jan 25 14:48:24 CET 2008

> try this:
> val = oRS.Fields(dt).Value
> print type(val)

this gives:  <type 'time'>

> print float(val)

yes, it gives 0.0

But there should be a way to print what is *actually in the field*.
When I open the DB table in Access I see: 12:00:00 AM.

That's what I want - the value, and the form of the value, exactly as
seen in the field...

As an aside, the roughly eqivalent code in Perl will print the
"12:00:00 AM" - (the trick for the date types in Perl is to add: "use

There has to be a way:^)


More information about the Python-list mailing list