Vague condition problem.

D

Dawn

There is a field with the attribute of Date, with the value:
Eg: 2008-5-20
I’d like to filter out all records occur in May 2008,
Use the sql:
Where “Date Field†like “#2008-5-*#â€,
But the results turned out to include records in Apr.2008 and Jue.2008,
What’s wrong with my condition, how to correct it ?
Thanks.
Dawn
 
D

Dawn

Very Thanks

Steve Schapel said:
Dawn,

Try it like this:

WHERE Format([YourDateField],"yyyymm") = "200805"

--
Steve Schapel, Microsoft Access MVP
There is a field with the attribute of Date, with the value:
Eg: 2008-5-20
I’d like to filter out all records occur in May 2008,
Use the sql:
Where “Date Field†like “#2008-5-*#â€,
But the results turned out to include records in Apr.2008 and Jue.2008,
What’s wrong with my condition, how to correct it ?
Thanks.
Dawn
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top