Vague condition problem.

  • Thread starter Thread starter Dawn
  • Start date Start date
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
 
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
 
Back
Top