I need help to create query to compare between date with time and date without time. I am using python with access db (pypyodbc).
In the database I have a column that co
Consider using MS Access' DateValue function that extracts only the date component (TimeValue
being the time component counterpart).
Also, consider passing your date value as parameter to better integrate with your Python environment with no need to concatenate into Access' #
form. Below passes a parameter as tuple of one item:
from datetime import datetime
...
cur.execute("SELECT * FROM MDSSDB WHERE DateValue([ValidStartTime]) = ?", (datetime(2016, 5, 17),))