problem with function Now()

  • Follow


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!
0
Reply Shiller 3/18/2008 8:07:34 PM

"Not working" isn't very descriptive.

What is happening?

Regards

Jeff Boyce
Microsoft Office/Access MVP

"Shiller" <shillerc@gmail.com> wrote in message 
news:6a94cb4b-c083-4bb1-8575-f3b9cd91e363@n58g2000hsf.googlegroups.com...
> 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! 


0
Reply Jeff 3/18/2008 8:28:07 PM


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.
-- 
KARL DEWEY
Build a little - Test a little


"Shiller" wrote:

> 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!
> 
0
Reply Utf 3/18/2008 8:29:02 PM

On Mar 18, 4:28 pm, "Jeff Boyce" <nonse...@nonsense.com> wrote:
> "Not working" isn't very descriptive.
>
> What is happening?
>
> Regards
>
> Jeff Boyce
> Microsoft Office/Access MVP
>
> "Shiller" <shill...@gmail.com> wrote in message
>
> news:6a94cb4b-c083-4bb1-8575-f3b9cd91e363@n58g2000hsf.googlegroups.com...
>
> > 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!

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.

0
Reply Shiller 3/18/2008 8:44:18 PM

> 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

-- 
HTH,
George


"Shiller" <shillerc@gmail.com> wrote in message 
news:b9fa5c81-a108-4ac6-93e6-34df7735221f@e39g2000hsf.googlegroups.com...
> On Mar 18, 4:28 pm, "Jeff Boyce" <nonse...@nonsense.com> wrote:
>> "Not working" isn't very descriptive.
>>
>> What is happening?
>>
>> Regards
>>
>> Jeff Boyce
>> Microsoft Office/Access MVP
>>
>> "Shiller" <shill...@gmail.com> wrote in message
>>
>> news:6a94cb4b-c083-4bb1-8575-f3b9cd91e363@n58g2000hsf.googlegroups.com...
>>
>> > 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!
>
> 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.
> 


0
Reply George 3/18/2008 8:57:41 PM

4 Replies
184 Views

(page loaded in 0.092 seconds)

Similiar Articles:
















7/26/2012 1:39:04 AM


Reply: