Date Restrictor for this month

H

Haji

Hi,

How do I do a date restrictor that gives me month to date
numbers (June 1 to June 16th) . Also, How do I get a
date restrictor for last june month to date (6/1/03 to
6/16/03) on a going forward basis. I will eventually
create a month to date sales report of our customers that
also shows what their month to date sales were last year
at this time. This will be part of an application that
will be used continuously over the next year or so.

Thanks,

Haji
 
V

Van T. Dinh

Do you mean criteria for you Select Query?

If so, for the current month to date:

BETWEEN DateSerial(Year(Date()), Month(Date()), 1)
AND Date()

and for the corresponding period last year:

BETWEEN DateSerial(Year(Date()) - 1, Month(Date()), 1)
AND DateSerial(Year(Date()) - 1, Month(Date()), Day(Date()))

You will have to think about corresponding periods for leap year and
non-leap year!
 

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