Date Criteria in Queries (1 Viewer)

majid.pervaiz

Registered User.
Local time
Today, 23:00
Joined
Oct 15, 2012
Messages
110
Dear All,

I have a date in the table which is a future date i.e. "Next_Review_Date", this table contains several records.
What I would like to show is that only the records which are due in upcoming 2 months.
For example: an item is due for review on 28-August-2017, it should appear in the result of query. two months prior to 28-august-2017 will be 28-June-2017.

I am trying to use between and DatePart but it is not giving me the required result
 

Ranman256

Well-known member
Local time
Today, 16:00
Joined
Apr 9, 2015
Messages
4,337
Select * from table where [nextReviewDate] between DateAdd("m",-2,date) and date
 

majid.pervaiz

Registered User.
Local time
Today, 23:00
Joined
Oct 15, 2012
Messages
110
Select * from table where [nextReviewDate] between DateAdd("m",-2,date) and date

How can I do this in access query... sql view is completely different
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 13:00
Joined
Aug 30, 2003
Messages
36,126
In design view put everything starting with Between in the criteria of the date field.
 

Users who are viewing this thread

Top Bottom