Date Between Criteria

naungsai

Abecedarian
Local time
Today, 15:26
Joined
Sep 8, 2008
Messages
123
Dear Friends

In my Query, I have a Date Column. In this date column I want to put a crieteria in. The criteria is Dates between Today and 6 months before.

I try to put the following one. But it does not work.

Between #[Date()-180]# and #[Date()]#

Please help me.

Best:D
 
6 months is not usually the same as 180 days.

You can use the DateAdd() function to add or subtract months form a date.

If you really want the previous 6 months then try:

Code:
Between DateAdd("m",-6,Date()) and Date()


Hope this helps ...
 
Last edited:
Try simply using;
Code:
Between Date()-180 And Date()
 
You only need the hash (#) if you are using a specific date eg. 08/01/2009 and you only need the square brackets if you are referring to a field name.
 
Dear Friends (High Tech Coach and John Big Booty):D

Thanks for you quick resonse. Both of yours work.

Best
 

Users who are viewing this thread

Back
Top Bottom