The SQL statement
SELECT pendingdetailsDrum.ID, DateValue([orderDate]) AS DatePortion
FROM pendingdetailsDrum
WHERE DateValue([orderDate])=DateValue('1/2/2006')
is giving me Internal OLE Automation Error, however when I remove the Where clause it works.
Can someone explain why? OR...
The reason I am using DateValue is because the orderDate field has a date portion and a time portion. When I put a date in the criteria it is not found because of the time portion. I guess I could run an update query and change all the date + time to just date, however , I would rather use the SQL Statement using the DateValue function.
Thanks so much for your responses.
SELECT pendingdetailsDrum.ID, DateValue([orderDate]) AS DatePortion
FROM pendingdetailsDrum
WHERE DateValue([orderDate])=DateValue('1/2/2006')
is giving me Internal OLE Automation Error, however when I remove the Where clause it works.
Can someone explain why? OR...
The reason I am using DateValue is because the orderDate field has a date portion and a time portion. When I put a date in the criteria it is not found because of the time portion. I guess I could run an update query and change all the date + time to just date, however , I would rather use the SQL Statement using the DateValue function.
Thanks so much for your responses.
Last edited: