[EpiData-list] Date range selection for age calculation

epidata-list at lists.umanitoba.ca epidata-list at lists.umanitoba.ca
Wed Feb 21 02:40:00 CST 2007

The result variable (age) should be float type (###.#)
Try it this way, it works.

Gilles Delmas

-----Message d'origine-----
De : epidata-list at lists.umanitoba.ca [mailto:epidata-list at lists.umanitoba.ca] 
Envoyé : mardi 20 février 2007 08:16
À : epidata-list-request at lists.umanitoba.ca
Cc : epidata-list at lists.umanitoba.ca
Objet : [EpiData-list] Date range selection for age calculation

 Dear Epidata team friends,
                                              I have two American date format variables. DOB is date of birth of baby and WDATE is date of weighing the baby for the growth monitoring. 

I used to write the following statement to calculate the age in months in EPI6

Define age ###
Let age=(WDATE - DOB)/30.44

 That does not work in EPI ANALYSIS

I tried the statement;
Let age= (date("WDATE","mdy") - date("DOB","mdy"))/30.44 The error message was; Data type mismatch

Please help.

Shavinder Singh

More information about the EpiData-list mailing list