By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,117 Members | 1,093 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,117 IT Pros & Developers. It's quick & easy.

Query help

P: 4
I have a column with expiration dates (in a ## / ## / ## format). I'd like to query those dates by month. Any ideas how to set up the criteria?

Thanks,
Kathy
Oct 20 '06 #1
Share this Question
Share on Google+
5 Replies


MMcCarthy
Expert Mod 10K+
P: 14,534
To get the month value of a date

Month(DateFieldName)

Returns 1 for January etc...


I have a column with expiration dates (in a ## / ## / ## format). I'd like to query those dates by month. Any ideas how to set up the criteria?

Thanks,
Kathy
Oct 20 '06 #2

P: 4
I'm getting an Invalid Syntax message.

I'm entering Month(ChangeOutDate) in the criteria row for that same column.
Oct 20 '06 #3

P: 4
I have entries in the ChangeOutDate column in a ## / ## / ## format. I'd like the user to be able to query all items expiring in November.

Maybe this example will help.

thanks again,
Kathy
Oct 20 '06 #4

MMcCarthy
Expert Mod 10K+
P: 14,534
Don't put it in the criteria section.

Create a new column

MonthNo: Month([ChangeOutDate])

You can then set the criteria on this column to:

1 (This will return all records for January)
2 (This will return all records for February)
etc...


I'm getting an Invalid Syntax message.

I'm entering Month(ChangeOutDate) in the criteria row for that same column.
Oct 20 '06 #5

P: 4
Got it!

Thanks so much.

Kathy
Oct 20 '06 #6

Post your reply

Sign in to post your reply or Sign up for a free account.