Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help Building a Record-to-Record comparison 1

Status
Not open for further replies.

jenschmidt

Programmer
Sep 30, 2002
145
US
We are dealing with patient data and would like to calculate the amount of time between patient visits in order to make sure everyone is coming in as often as they should be. Example of data:

PtName PtNumber LastVisit TransactionNumber
Jane Doe 15 10/15/99 101452
Jane Doe 15 11/01/99 115438
Jane Doe 15 12/03/99 123546
Jane Doe 15 01/02/00 259877

How do I calculate the amount of time (in days) that has passed between each visit? jennifer.giemza@uwmf.wisc.edu
 
Use the Previous({fld}) function to refer to the previous value.

For example,
--------------------------------------------------
IF Previous({PtName})={PtName} THEN
DateDiff("d", Previous({LastVisit}), {LastVisit}}
--------------------------------------------------

Cheers,
- Ido CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
You guys are wonderful - Thank you very much! Just when I think I've learned as much as this brain can possibly hold, I learn something new - I just worry about old info that's falling out the other ear! :) jennifer.giemza@uwmf.wisc.edu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top