dear all
i have some date related problems
where i have to calculate age from death date to birth date
for example death date 22/04/1928 birth date 21/02/2015
for this i used "gen age ==(dthdate-bdate)"
this command calculate age in dayes like 31747
than i had used this command "gen age1=(age/365)"
it calculate age in years 86.97808
now i want to transfer this fraction age in to a complete number like
86.97808=87
the condition i want to use is if the number after fraction >.50 i want the next number like 1.52=2
and if the umber after fraction<.50 i want the previous number like1.49=1
How can i solve this?
Regards
Raeed
i have some date related problems
where i have to calculate age from death date to birth date
for example death date 22/04/1928 birth date 21/02/2015
for this i used "gen age ==(dthdate-bdate)"
this command calculate age in dayes like 31747
than i had used this command "gen age1=(age/365)"
it calculate age in years 86.97808
now i want to transfer this fraction age in to a complete number like
86.97808=87
the condition i want to use is if the number after fraction >.50 i want the next number like 1.52=2
and if the umber after fraction<.50 i want the previous number like1.49=1
How can i solve this?
Regards
Raeed
Comment