date query with a starting date

I have an access field called  

date_proposal_completed - date/time

I need to find records that are past 30 days of a starting point date in this field.

i.e.   i want to start with a date of 10/01/2015 and find records that are beyond 30 days and less than 60 past this date ?

Difference: DateDiff('d',[date_proposal_completed],Date())
>30 and <60

this is not working.

Thanks
fordraiders
LVL 3
FordraidersAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dale FyeOwner, Developing Solutions LLCCommented:
how about:

WHERE DateAdd("d", 30, [date_proposal_completed]) < Date()
AND Date() < DateAdd("d", 60, [date_proposal_completed])

Or:

WHERE DateDiff("d", [date_proposal_completed], Date()) BETWEEN 30 and 60

You might need to tweek the 60 to to 61 to get the right set of dates, but I think either of those would work for you.
FordraidersAuthor Commented:
dale, did not explain correctly.

I want to base all queries on a starting point date , which is 10/01/2015

Get records that are 30 days past this date
so the records that are past 11/01/2015 BUT not more than 60 days past 10/01/2015
Dale FyeOwner, Developing Solutions LLCCommented:
WHERE (DateAdd("d", 30, #10/1/15#) < [date_proposal_completed])
AND ([date_proposal_completed] < DateAdd("d", 60, #10/1/15#))

Or:

WHERE DateDiff("d", #10/1/15#, [date_proposal_completed]) BETWEEN 30 and 60

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

FordraidersAuthor Commented:
dale, invalid syntax on both sql's:

WHERE (DateAdd("d", 30, #10/1/15#) < [date_proposal_completed])
AND ([date_proposal_completed] < DateAdd("d", 60, #10/1/15#))

Or:

WHERE DateDiff("d", #10/1/15#, [date_proposal_completed]) BETWEEN 30 and 60
FordraidersAuthor Commented:
dale, sorry my fault..
WHERE (DateAdd("d", 30, #10/1/15#) < [date_proposal_completed])
AND ([date_proposal_completed] < DateAdd("d", 60, #10/1/15#))

worked !!
FordraidersAuthor Commented:
Thanks !
Dale FyeOwner, Developing Solutions LLCCommented:
glad that worked for you.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.