robertsfd
Technical User
- Apr 18, 2003
- 40
I have a table with a date field. I want to restrict query results to dates of a certain month. I'm thinking this could be done with LIKE something such as the follows (example assumes I want dates of March):
WHERE Date LIKE 3*
Is this possible? I can't figure out how to do something like this where the data type is a date? The best I could do is this:
WHERE Left(Date,1)=3
But this only works on months 2 through 9. Put a 1 in and you get January, October, November, and December. I tried Left(Date,2)=3 but this doesn't work at all.
Any suggestions? I've tried everything I could think of with various combinations of wildcard characters. I think you may only be able to do this on string/text data.
WHERE Date LIKE 3*
Is this possible? I can't figure out how to do something like this where the data type is a date? The best I could do is this:
WHERE Left(Date,1)=3
But this only works on months 2 through 9. Put a 1 in and you get January, October, November, and December. I tried Left(Date,2)=3 but this doesn't work at all.
Any suggestions? I've tried everything I could think of with various combinations of wildcard characters. I think you may only be able to do this on string/text data.