[EpiData-list] Calculating age

epidata-list at lists.umanitoba.ca epidata-list at lists.umanitoba.ca
Tue Nov 24 02:12:17 CST 2009


epidata-list at lists.umanitoba.ca wrote:
>          LET AGE=ROUND(INT(TODAY-DOB)/365.25)
>   

Instead of using "round" use the function "trunc" - it extracts only the 
integer part of the number, effectively rounding towards zero.


LET AGE = TRUNC(INT(TODAY - DOB) / 365.25)


Kind regards,
Torsten Bonde Christiansen.
EpiData Software Developer.


More information about the EpiData-list mailing list