Python ADO Date Time database fields

Mike Driscoll kyosohma at gmail.com
Fri Jan 25 08:54:22 EST 2008


On Jan 25, 7:48 am, goldtech <goldt... at worldpost.com> wrote:
> 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

You could try posting to the PyWin32 group too. They would probably
know.

http://mail.python.org/mailman/listinfo/python-win32

Mike



More information about the Python-list mailing list