I am converting dates in numeric format in my Access database that I've imported into SAS into date format in SAS. There are a few that are entered as 99999999 in Access and have converted into dates. How would I handle these?
@rangarat wrote:
Hi! I think I'm expecting it to be more complicated than this, and maybe this is the solution. I was also curious about those dates that have a month and year, but no day (it's entered as 12/99/10 for example). Is it safe to handle these as missings, too?
Actually with that specific example you cannot be sure which of any of those "fields" is a day, a month or a year. That could be the 10th day of an unidentified month in 2012 of 1912 (or 1812), the unspecified month for day 12 in 2010 or 1910 as well as an unknown day in month 12.
I would probably handle these as missing values in SAS.
@rangarat wrote:
Hi! I think I'm expecting it to be more complicated than this, and maybe this is the solution. I was also curious about those dates that have a month and year, but no day (it's entered as 12/99/10 for example). Is it safe to handle these as missings, too?
How can anyone here across the internet answer this question? We don't know the situation you are in, what the data is, why you are using this data, or what analysis will be performed. And we don't even know what you mean by "safe".
@rangarat wrote:
Hi! I think I'm expecting it to be more complicated than this, and maybe this is the solution. I was also curious about those dates that have a month and year, but no day (it's entered as 12/99/10 for example). Is it safe to handle these as missings, too?
Actually with that specific example you cannot be sure which of any of those "fields" is a day, a month or a year. That could be the 10th day of an unidentified month in 2012 of 1912 (or 1812), the unspecified month for day 12 in 2010 or 1910 as well as an unknown day in month 12.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.
Ready to level-up your skills? Choose your own adventure.