View Single Post
Old 22-Oct-2007, 12:50 AM   #1 (permalink)
Anilrgowda
Administrator
 
Anilrgowda's Avatar

Posts: 18,720
Join Date: Jan 2006
Rep Power: 10 Anilrgowda is on a distinguished road

IM:
Default SQL SELECT with DateTime

I have a MS Access database table with a DateTime field in it. The following INSERT statement works:

INSERT INTO Table VALUES(...., '4/26/2007 5:25:59 PM', ....)

but the SELECT statement never works when I specified the same string (it gives me Data Type Mismatch error):

SELECT * FROM Table WHERE .... AND Time = '4/26/2007 5:25:59 PM' ...

What is the correct way to do this? Thanks!


------------------


Anilrgowda is offline   Reply With Quote