Date difference

N

Nance

I have the following expression in the Field name of my
query: Length of Follwup Pt: DateDiff("yyyy",
[ProcedureDate],[patienthip].[formdate])+Int(Format
([proceduredate],"mmdd")<Format([patienthip].
[formdate],"mmdd"))

But by my "finger count", I'm not getting correct answers.
Here's a few examples of what's in each field.
[ProcedureDate] 12/11/1996 | 9/15/1997 | 11/17/1997
[patienthip].[formdate] 12/21/2000 | 2/13/2001 | 11/30/1997
Length of Follwup Pt 3 | 4 | -1
Should be 4 | 3 | 0

What am I doing wrong?
TIA to whomever answers
 
J

John Spencer (MVP)

Try changing the comparison operator from < to >= in the last part of the
calculation.
 

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

Similar Threads


Top