I am calculating age difference between birthdate & today's date. As in data, We have partial birthdate i.e. sometimes birthdates such as full date(2000-12-12), only year+month(2000-12) or only year(2000) is available.
How we can calculate age on available birthdate date part.
In SAS, we use below formula,
yrdif(date1, date2, "ACT/ACT")
I tried using R,
time_length(difftime(TODAYDT, BRTHDT), unit = "year"))
but for partial dates it doesn't work, Can you please let me know how I can address this?
Thank you,
Harshal