If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Date Restrictor for this month
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 |
#2
|
|||
|
|||
Date Restrictor for this month
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! -- HTH Van T. Dinh MVP (Access) "Haji" wrote in message ... 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 |
Thread Tools | |
Display Modes | |
|
|