BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
rangarat
Calcite | Level 5

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?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

@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.

 

 

View solution in original post

4 REPLIES 4
PaigeMiller
Diamond | Level 26

I would probably handle these as missing values in SAS. 

--
Paige Miller
rangarat
Calcite | Level 5
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?
PaigeMiller
Diamond | Level 26

@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".

--
Paige Miller
ballardw
Super User

@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.

 

 

SAS Innovate 2025: Call for Content

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 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 1462 views
  • 0 likes
  • 3 in conversation