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 Super FREQ
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 Super FREQ
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

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

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
  • 448 views
  • 0 likes
  • 2 in conversation