Searching a month from specified date

MCCDOM

Registered User.
Local time
Today, 19:21
Joined
Oct 30, 2014
Messages
84
Hi There,

I am trying to create a query that returns all data with a date that falls within a month of the specified date I have entered.
For example if I entered a date of 11/11/2016 I would like the query to return all records that have a date equal or between the 11/11/2016 and a month previous (in this case 11/10/2016).

Thanks in advance.

Dom
 
use the dateadd function to deduct a month from the your 'end' date

i.e.

SELECT *
FROM myTable
WHERE myDate Between [Enter Date] AND Dateadd("m",-1,[Enter Date])
 
Thanks CJ_London,

I will give that a go.
 
All working perfectly. Thanks again CJ_London.

Kind regards,

Dom
 

Users who are viewing this thread

Back
Top Bottom