Hi everyone,

I'm looking to find the exact age of survey participants in months. Right now I'm subtracting the date the participant was born from the date the survey took place with the code

Code:
 
 gen ageinmonths= (CB_DOIW - participant_DOB)/(365.25/12)
both CB_DOIW and child_DOB are in %td format.

This gives the wrong results. Participants who did the survey on their birthday, ie:

CB_DOIW = 19/3/2021
participant_DOB = 19/3/2013

should have their ageinmonths be equal to 96, instead the above code gives .6668489 as an answer. I'm unsure of what I'm doing wrong here.