How to give between dats as criteria in the append query

S

subbu

Hi,
I want to select the records based on a date field.Teh
date field has values for the current and previous
months.How to select records for the current month.I am
using append query

regds
subbanna girish
 
S

subbu

Thanks for the code.Is it possible to extract the current
month date as criteria

subbu


-----Original Message-----
Hi,
I want to select the records based on a date field.Teh
date field has values for the current and previous
months.How to select records for the current month.I am
using append query

regds
subbanna girish

A criterion of

BETWEEN DateSerial(Year(Date()), Month(Date()), 1) AND
DateSErial(Year(Date()), Month(Date()) + 1, 0)

will give you all the records where a date field is within the current
month.

Another way to do it is to put a calculated field in the Query defined
as

Month([datefield])

and use a criterion of Month(Date()), but this will pull results from
all dates in July, no matter which year's July.





.
 

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