Python ADO Date Time database fields

goldtech goldtech at worldpost.com
Fri Jan 25 08:48:24 EST 2008


snip
>
> 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
Win32::OLE::Variant;"

There has to be a way:^)

snip



More information about the Python-list mailing list