Hello,
I am trying to write code to calculate my participants birthdates at the time the data was collected. The info for age that was collected was ONLY month and year, so September 1988. My data was collected in 3 months in 2010, also no date available.
Any ideas for formatting? Should I put the first or the thirtieth for the days?
Thanks!!!
@klongway wrote:
Hello,
I am trying to write code to calculate my participants birthdates at the time the data was collected. The info for age that was collected was ONLY month and year, so September 1988. My data was collected in 3 months in 2010, also no date available.
Any ideas for formatting? Should I put the first or the thirtieth for the days?
Thanks!!!
I would tend not to use day 30 because of February. What impact would there be on your analysis or use of a person's age is overestimated by 1 day? 15 days? 30 days? or any other interval? If there is an actual impact then you will have to describe some values and the specific impacts involved.
If there is no specific impact then any "reasonable" rule could be used. I might tend to use mid-month for the data where I have month and year. For a 3-month period without any other date then likely the middle of that period.
Do you need a biologic age, such as 11.43 years, or a "legal" age where that would be truncated to 11? Or do you need other units than years such as weeks or months?
@klongway wrote:
Hello,
I am trying to write code to calculate my participants birthdates at the time the data was collected. The info for age that was collected was ONLY month and year, so September 1988. My data was collected in 3 months in 2010, also no date available.
Any ideas for formatting? Should I put the first or the thirtieth for the days?
Thanks!!!
I would tend not to use day 30 because of February. What impact would there be on your analysis or use of a person's age is overestimated by 1 day? 15 days? 30 days? or any other interval? If there is an actual impact then you will have to describe some values and the specific impacts involved.
If there is no specific impact then any "reasonable" rule could be used. I might tend to use mid-month for the data where I have month and year. For a 3-month period without any other date then likely the middle of that period.
Do you need a biologic age, such as 11.43 years, or a "legal" age where that would be truncated to 11? Or do you need other units than years such as weeks or months?
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: