[EpiData-list] How to calculate age

epidata-list at lists.umanitoba.ca epidata-list at lists.umanitoba.ca
Sat Oct 8 09:41:29 CDT 2011


Hello everybody,
I am trying to write a syntax in .chk file to automatically calculate age during the data entry from the today's date and the DoB.The syntax is :
" ddn
    MUSTENTER
  END


  age
   NOENTER
   BEFORE ENTRY
       let age=(round(int((date-ddn)/(365.25))))
   END
 END"
The variables are coded in the .qes file as follows:
{DATE}    automatique                                                      <Today-dmy>{DDN}     DATE DE NAISSANCE (DATE OF BIRTH)           <dd/mm/yyyy>{AGE}     automatique           	                                       ###
What's wrong with my syntax?
Sincerely hope you can help me.
Regards,
Sophie PilleronPhD student.
 		 	   		  


More information about the EpiData-list mailing list