My data has a birthday variable that I need to convert into age. I've spent some time researching and trying different options, but for some reason, I wasn't able to do so.
Code:
clear input long id double birthdate 658434 2.374452e+11 658442 3.366324e+11 658443 1.474164e+11 658449 1.0698264e+12 658453 8.80524e+11 658481 4.694328e+11 658499 2.720916e+11 658511 -3.924972e+11 658516 4.042836e+11 658554 -4.187628e+11 658571 2.077632e+11 658576 4.52322e+11 658577 -4.264524e+11 658579 -8.35308e+10 658582 7.777044e+11 658616 3.8988e+10 658621 -5.313384e+11 658633 -3.99852e+10 658659 4.171203e+11 658677 -3.253644e+11 end format %tc birthdate
0 Response to Creating age variable from date of birth
Post a Comment