Dates Query

  • Thread starter Thread starter John Thomas
  • Start date Start date
J

John Thomas

I have a module set up which includes the following
calulation:

waittime = DateDiff("d", Nz([LastDNAdate], [bookdate]),
[cendate])

This works fine if there is a LastDNAdate in the field,
but when the LastDNAdate is blank then I get a value of
37864.

What am I doing wrong. I am pretty new to VB so a
detailed breakdown of how to correct my problem would be
helpful. Thanks.
 
Sometimes Access misunderstands the data types, especially where unbound
controls, nulls, and Nz() are involved.

Try:
waittime = DateDiff("d", CVDate(Nz([LastDNAdate], _
[bookdate])), [cendate])
 
Back
Top