BookmarkSubscribeRSS Feed
mmmr64
Calcite | Level 5

Hi 

Thank you in advance for helping 

 

I have data in character as month name : eg April, May June etc

how can i change that to date?

 

that would be helpful for my assignment 

 

Thank you 

3 REPLIES 3
Sam_SAS
SAS Employee
Hello,

Is your column a date with a Month format on it, or is your column a category (character variable)?

If it is a date, you can just change the format on the Data pane.

If it is a category, it is possible to create a date by using the DateFromMDY() operator in a calculated expression, but it would probably be much easier to go back into your data preparation phase and transform the data into a date there.

Let us know if that helps,

Sam
Sam_SAS
SAS Employee
Actually, you could use the Parse() operator to make a date from a category if there is a format that matches your values.

For example, Parse('15JAN2013', 'DATE9.') returns 15JAN2013 as a date value.
mmmr64
Calcite | Level 5
thank you so much
thank you thank you

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 1239 views
  • 0 likes
  • 2 in conversation