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 questions
Hello,
I have a date field called DR. I need to capture all date that are between two and eight months old starting at the first day eight months ago and ending with the last day of the month two months ago. So if I were to run it today, it would be all transactions between 9/1/08 and 3/31/09. If I were to run it in June, it would be between 10/1/08 and 4/30/09. Can someone help? Thanks, |
#2
|
|||
|
|||
date restrictor questions
Use the DateSerial function.
This; DateSerial(Year(Date()), Month(Date())-8, 1) will return the first day of the month that is 8 months prior to the current month. This; DateSerial(Year(Date()), Month(Date())-1, 0) will return the day prior to the first day of last month (i.e. the last day of the month before that) -- _________ Sean Bailey "Chuck W" wrote: Hello, I have a date field called DR. I need to capture all date that are between two and eight months old starting at the first day eight months ago and ending with the last day of the month two months ago. So if I were to run it today, it would be all transactions between 9/1/08 and 3/31/09. If I were to run it in June, it would be between 10/1/08 and 4/30/09. Can someone help? Thanks, |
Thread Tools | |
Display Modes | |
|
|