Click to See Complete Forum and Search --> : Search Date Field Issue


theflyingminst
02-15-2009, 08:35 PM
Hi I'm trying to search a date field in Access 2007 with classic ASP and the records in the database are not pulling up for some reason.

Is this the correct syntax?

strSQL = "SELECT * FROM calendar WHERE cal_date LIKE " & goDate


Thanks so much

yamaharuss
02-15-2009, 08:38 PM
try enclosing the date...

strSQL = "SELECT * FROM calendar WHERE cal_date = '" & goDate & "' "

I don't believe you can use LIKE in your query

theflyingminst
02-15-2009, 08:40 PM
That worked! Thanks so much Yamaharuss!