![](https://secure.gravatar.com/avatar/f174b9816ccce31bf5cdb49501b15358.jpg?s=120&d=mm&r=g)
Hi; The result variable (age) should be float type (###.#) Try it this way, it works.
Gilles Delmas
-----Message d'origine----- De : epidata-list@lists.umanitoba.ca [mailto:epidata-list@lists.umanitoba.ca] Envoyé : mardi 20 février 2007 08:16 À : epidata-list-request@lists.umanitoba.ca Cc : epidata-list@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