Date problem

A

APH

Hi I really have a block where Date is concerned.

Can some kind person show me the syntax if I was to query all records from a
table where the month is equal to current month?

Thanks

Alex
 
B

Brian Camire

If you only want records from the current month *in the current year*, you
might use a WHERE clause that looks something like this:

WHERE
[Your Table].[Your Date Field] >= DateSerial(Year(Date()),Month(Date()),1)
AND
[Your Table].[Your Date Field] < DateSerial(Year(Date()),Month(Date())+1,1)
 

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