[EpiData-list] date field: check fails

epidata-list at lists.umanitoba.ca epidata-list at lists.umanitoba.ca
Thu Aug 6 10:23:31 CDT 2009

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:

     IF ((year(DOB) < 1900) OR (DOB > TODAY)) THEN
       HELP "This date is not allowed" TYPE=ERROR
       CLEAR DOB
       GOTO DOB

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,

version info: epidata v3.1 (270108), on windows XP.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: peter_konings.vcf
Type: text/x-vcard
Size: 334 bytes
Desc: not available
Url : http://lists.umanitoba.ca/pipermail/epidata-list/attachments/20090806/a462cc07/peter_konings.vcf

More information about the EpiData-list mailing list