zero days instead of#error

  • Thread starter Thread starter Dave Elliott
  • Start date Start date
D

Dave Elliott

here is my formula, but when the form is openes it shows #error instead of
the value, how can I make it show zero when a difference does not exist?
=DateDiff("d",[StartDte],[Text463])
 
Try this
=iif (isnull([StartDte]) or
isnull([Text463]),0,DateDiff("d",[StartDte],[Text463])
 
First question: Is [Text463] a Date/Time field?

I just tested one of my apps with your expression (using my date fields)
and it is working fine.
Cheers!
Denis
 
[Text463] is probably not being seen as a date. I would test for that and
convert it to a date.

Ofer said:
Try this
=iif (isnull([StartDte]) or
isnull([Text463]),0,DateDiff("d",[StartDte],[Text463])


Dave Elliott said:
here is my formula, but when the form is openes it shows #error instead of
the value, how can I make it show zero when a difference does not exist?
=DateDiff("d",[StartDte],[Text463])
 
Back
Top