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?
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 FyeCommented:
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.
0
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
0
Dale FyeCommented:
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
0

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
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy 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
0
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 !!
0
FordraidersAuthor Commented:
Thanks !
0
Dale FyeCommented:
glad that worked for you.
0
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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.