DATA Step, Macro, Functions and more

Transform characters column to date

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 103
Accepted Solution

Transform characters column to date

Good morning SAS users:

 

I have imported some data from excel to SAS and it looks to be hard to fix this, but the dates are now numeric, the interesting is that in the propieties SAS says that this column is made of characters:

 

How can y caonver this column into date format (mmddyy10.)

 

 

Thank you very much


Accepted Solutions
Solution
‎03-31-2016 02:26 PM
Super User
Posts: 10,550

Re: Transform characters column to date

I would generally start by saving the Excel as CSV and import that as import direct from Excel is prolematic. Search this forum to see how many questions there are about Excel and import.

 

Barring that, you would have to show us exactly what the current character values look like as it will likely depend on using one of many formats to do the proper translation.

 

View solution in original post


All Replies
Solution
‎03-31-2016 02:26 PM
Super User
Posts: 10,550

Re: Transform characters column to date

I would generally start by saving the Excel as CSV and import that as import direct from Excel is prolematic. Search this forum to see how many questions there are about Excel and import.

 

Barring that, you would have to show us exactly what the current character values look like as it will likely depend on using one of many formats to do the proper translation.

 

Frequent Contributor
Posts: 103

Re: Transform characters column to date

thank you Ballardw:

I will still using old school importing ahahaha, save as CSV, space separated file and format it in the input statement.

thanks a lot my friend
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 179 views
  • 0 likes
  • 2 in conversation