
Dear all,
I'm just starting to use epidata entry so I have probably overlooked something. Any pointers are appreciated!
I defined a date field as follows in the .qes file:
DOB date of birth <dd/mm/yyyy>
in the .rec file I added the following sanity check:
DOB MUSTENTER AFTER ENTRY IF ((year(DOB) < 1900) OR (DOB > TODAY)) THEN HELP "This date is not allowed" TYPE=ERROR CLEAR DOB GOTO DOB ENDIF END END
Most of the time the field behaves as I expect it to: dates in the future or far in the past are not allowed. However, the following typo gets accepted without triggering an error: 05/08/20001. Adding an extra trailing zero (05/08/200010) results in a prompt conversion to 05/08/3402, and the sanity check works again. Some experimentation seems to confirm that values between 20000 and 20099 are accepted as valid for year, bigger values trigger either my check or are converted to some weird value, again triggering the check.
How can I prevent this from happening?
thanks in advance, Peter
version info: epidata v3.1 (270108), on windows XP.