Access Query Date Range

juneau730

Board Regular
Joined
Jun 7, 2018
Messages
111
Hi all, I have been racking my head, searching the wonderful world of Google and haven't had any luck finding a solution to my dilemma.

Is there a way to filter a query where a specific date field is >=90 and <365 of today's date? Since my dates in the specific field are "Live" (changing every day).

Thanks in advance for your assistance.
 
Last edited:

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Assuming you are looking for past dates (and note future), but this in the criteria of that field:
Code:
Between (Date()-365) And (Date()-90)
If future, try:
Code:
Between (Date()+90) And (Date()+365)
 
Upvote 0
Assuming you are looking for past dates (and note future), but this in the criteria of that field:
Code:
Between (Date()-365) And (Date()-90)
If future, try:
Code:
Between (Date()+90) And (Date()+365)

Correct, I am looking for dates in the past (older than today). Does it matter in which order the -365 and -90 are? Will it work if written as such? (just curious)
Code:
Between (Date()-90) And (Date()-365)
 
Upvote 0
For the between 90 and 365 that worked! Thanks so much..

What is the proper string for today >= 90

I have been trying a bunch different ones and some give too much, other give none.
 
Upvote 0
What is the proper string for today >= 90
For more than 90 days in the future, use:
Code:
>= (Date()+90)

For more than 90 days in the past, use:
Code:
<= (Date()-90)
 
Upvote 0

Forum statistics

Threads
1,223,898
Messages
6,175,274
Members
452,628
Latest member
dd2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top