Access97, COM, and printing a date field - Problem.

Bill Wilkinson bwilk_97 at yahoo.com
Tue May 9 18:46:28 EDT 2000


hmm  I am not quite smart enough to know why it is not printing anything..
But I do know that if that field is a date time field, you will get a PyTime
object when you retrieve its value from the database..  Luckily the PyTime
object comes with a Format() function that returns a string... Below, t is a
Date/Time value I have retrieved from an Access table.

>>> t
<PyTime:12/30/99 11:34:00 PM>
>>> type(t)
<type 'time'>
>>> t.Format()
'12/30/0/ 23:34:00'
>>> print "The value of t is", t.Format(),"."
The value of t is 12/30/0/ 23:34:00 .

<rayleyva at my-deja.com> wrote in message news:8f9jr7$kk1$1 at nnrp1.deja.com...
| After much reading I've chosen to use the win32com access method to get
| to my Access97 data.  It's working great except when I try to print out
| a field that contains date information ... here's some code snippets.






More information about the Python-list mailing list