Trying to set a date field in a access databse

tedpottel at gmail.com tedpottel at gmail.com
Wed Nov 5 15:12:41 EST 2008


Hi,
I cannot get the following code to work

import win32com.client
import time

engine = win32com.client.Dispatch("DAO.DBEngine.36")
db=engine.OpenDatabase(r"testdate2.mdb")
access = db.OpenRecordset("select * from test")

access.AddNew()
access.Fields("test").value=time.strptime('10:00AM', '%I:%M%p')
access.Update()

wherer test is a datetime field,
How can I do this???????
-Ted




More information about the Python-list mailing list