zero days instead of#error

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])
 
O

Ofer

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

Denis Bisson via AccessMonster.com

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
 
K

Klatuu

[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])
 

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