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

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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
  • 959 views
  • 0 likes
  • 2 in conversation