I have two fields - ProgramEntry and ProgramExit.
I want to calculate how long a person has been in a program. I can do
that with a DateDiff ("d",[ProgramEntry], Date()) expression. But, I
run into a problem when they exit the program as it will keep adding
dates. Basically, I'm thinking that maybe I can have it calculate the
two DateDiff expressions and then display the lesser of the two (which
I don't know how to do) unless someone has another suggestion.
Any ideas?
John W. Vinson - 23 Feb 2008 19:56 GMT
>I have two fields - ProgramEntry and ProgramExit.
>
[quoted text clipped - 6 lines]
>
>Any ideas?
You only need one datediff if I understand this correctly:
DateDiff("d", [ProgramEntry], NZ([ProgramExit], Date())
will return the number of days from programentry to programexit *IF* there is
a date in programexit; if there isn't, the NZ function will use today's date
instead.

Signature
John W. Vinson [MVP]