The correct calculation of age is:
bday AFTER ENTRY LET age=integer((today-bday)/365.25) END END
Please have a look at the examples for Age - Today and Age - date of visit at http://epidata.dk/examples.php
You will also have to change the calculation of time1, time2 etc, which should be
time1=today-start1
Jamie
On May 14, 2014, at 8:49 AM, epidata-list@lists.umanitoba.ca wrote:
Jeg har fået et problem med at udregne alder og behandlingsvarighed, hvilket jeg slet ikke kan forstå, da jeg synes jeg har gjort det samme som i tidligere rec/chk files. Jeg har prøvet at kigge omkring i Jeres databaser efter hjælp, men kan ikke finde ud af, hvor mit problem stammer fra.
Jeg har vedhæftet rec og chk. filer, kan I finde fejlen?
in English:
I've got a problem with calculating age and duration of treatment, which I did not understand when I think I have done the same as in previous rec / chk files. I've tried to look around in Your databases for help, but can not figure out where my problem comes from.
I have attached rec and chk. files, you can find the error?