error on date formula

O

olivier

hello,
does anybody can help me on my form I got a minus sign as I enter the
formula in a form field :

DateDiff("d";Now();#01/08/2003#)

I got -116 instead of 116

Strange, isn't ?


PS I am running access xp over winxp home; in order to calculate the number
of unemployement days :-(


Thanks in advance
 
R

Rick Brandt

olivier said:
hello,
does anybody can help me on my form I got a minus sign as I enter the
formula in a form field :

DateDiff("d";Now();#01/08/2003#)

I got -116 instead of 116

Strange, isn't ?

Nope. The later date goes in the last argument if you want a positive result.
 
B

Brendan Reynolds \(MVP\)

Just swap them around ...

? datediff("d",now(),#01 aug 2003#)
-116
? datediff("d",#01 aug 2003#,now())
116
 

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

Top