Dear
I need help to calculate the date of birth from the age of people. I know the exact year, months and days that a person has until today (date_today). But, I need the dates of birth. I searched and there are several examples of how to calculate the age from the date of birth and a date of interest, but I did not find a reverse example (exact date of birth (year, day and month) from the exact age (age, months and days to current date).
Please, I appreciate any guidance.
the data variables are:
id: individual identifier
age_years: age in years to the present day
age_months: age in months to the present day
age_days: until today
date_today: reference date
A person who is 10 years, 0 months and 7 days old, means that he/she was born on February 12, 2015.
I sincerely hope you can help me
Best regards
Moses
copy starting from the next line -------------- --------
copy up to and including the previous line --------- --------
I need help to calculate the date of birth from the age of people. I know the exact year, months and days that a person has until today (date_today). But, I need the dates of birth. I searched and there are several examples of how to calculate the age from the date of birth and a date of interest, but I did not find a reverse example (exact date of birth (year, day and month) from the exact age (age, months and days to current date).
Please, I appreciate any guidance.
the data variables are:
id: individual identifier
age_years: age in years to the present day
age_months: age in months to the present day
age_days: until today
date_today: reference date
A person who is 10 years, 0 months and 7 days old, means that he/she was born on February 12, 2015.
I sincerely hope you can help me
Best regards
Moses
copy starting from the next line -------------- --------
Code:
* Example generated by -dataex-. For more info, type help dataex clear input float id int age_years byte(age_months age_days) float date_today 1 9 3 27 23791 2 56 11 25 23791 3 55 3 20 23791 4 60 4 26 23791 5 59 8 0 23791 6 49 7 2 23791 7 50 0 3 23791 8 60 3 27 23791 9 63 8 11 23791 10 62 5 27 23791 11 49 4 12 23791 12 50 8 4 23791 13 65 9 28 23791 14 62 4 14 23791 15 61 1 15 23791 16 53 2 28 23791 17 56 3 24 23791 18 64 2 4 23791 19 60 4 21 23791 20 62 5 16 23791 21 43 5 5 23791 22 56 11 10 23791 23 61 4 10 23791 24 60 5 14 23791 25 44 11 7 23791 26 52 0 13 23791 27 60 5 26 23791 28 61 2 13 23791 29 60 7 5 23791 30 59 11 27 23791 31 48 11 11 23791 32 45 8 12 23791 33 60 2 15 23791 34 58 1 18 23791 35 61 4 14 23791 36 61 8 9 23791 37 48 11 22 23791 38 57 6 6 23791 39 58 9 19 23791 40 52 7 20 23791 41 54 7 28 23791 42 60 4 19 23791 43 61 3 3 23791 44 60 0 30 23791 45 60 0 23 23791 46 62 7 20 23791 47 58 7 13 23791 48 61 1 16 23791 49 64 1 23 23791 50 57 9 3 23791 51 59 0 29 23791 52 76 11 7 23791 53 62 0 9 23791 54 59 7 17 23791 55 50 3 29 23791 56 49 3 29 23791 57 57 4 10 23791 58 55 8 8 23791 59 60 10 2 23791 60 103 8 27 23791 61 61 11 28 23791 62 61 3 29 23791 63 47 1 0 23791 64 57 3 15 23791 65 54 3 11 23791 66 61 10 26 23791 67 56 6 6 23791 68 50 5 4 23791 69 53 4 13 23791 70 62 8 27 23791 71 60 9 20 23791 72 45 1 17 23791 73 48 4 28 23791 74 60 9 24 23791 75 60 3 28 23791 76 57 6 17 23791 77 61 10 17 23791 78 56 7 13 23791 79 58 11 7 23791 80 17 0 18 23791 81 58 10 14 23791 82 61 1 8 23791 83 44 9 10 23791 84 51 1 8 23791 85 51 9 28 23791 86 70 4 26 23791 87 58 9 30 23791 88 53 2 15 23791 89 43 5 13 23791 90 60 7 14 23791 91 60 0 14 23791 92 52 0 6 23791 93 61 5 15 23791 94 59 10 1 23791 95 57 5 3 23791 96 48 3 2 23791 97 59 4 1 23791 98 59 11 15 23791 99 45 10 18 23791 100 57 11 14 23791 end format %td date_today
Comment