error on date formula

  • Thread starter Thread starter olivier
  • Start date Start date
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
 
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.
 
Just swap them around ...

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