problem with function Now()

  • Thread starter Thread starter Shiller
  • Start date Start date
S

Shiller

Experts,

I'm trying to add 14 days to the Now() function in a query but it's
not working. I try using it in conjunction with DateAdd function with
no success.

Please help!
 
"Not working" isn't very descriptive.

What is happening?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
It helps other to make suggestions if you give more information than 'but
it's not working.' What are your results? What is your exact SQL
statement that you are trying? Give examples of data input and output.
 
"Not working" isn't very descriptive.

What is happening?

Regards

Jeff Boyce
Microsoft Office/Access MVP

When I run the query with "Now() + 14" as the criteria I get nothing
back eventhough I have data in my table that matches that criteria.
 
When I run the query with "Now() + 14" as the criteria I get nothing
back eventhough I have data in my table that matches that criteria.

You sure about that?

Now() includes a Date *And* Time value. When you say you have data that
matches that criteria, it would have to match the hh:mm:ss as well as the
date, so it entirely possible that you don't have any matches. Actually, the
stored value is more precise that hh:mm:ss, so its even less likely you have
a match.

If the field you are trying to match only contains a Date value then you
probably want:
Date()+14
If the field you are trying to match contains Date and Time, but you only
want to match the Date portion then:
DateValue([MyDateTimeField]) with Criteria of Date()+14
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top