I'd like to format dates as follows. I've a month variable created and showing as 1,2,3,4,5,6,7,8,9,10,11,12 and I want to format it to January, February, March, ........, December. So how can I format month numeric values in full month name in SAS VA ?
In addition, I need to filter data based on months so how can I create a dynamic month variable. I just need to show data for the last two month from the whole year data ? Month variable is a category.
Thanks in advance !
In SAS VA you should load "proper" SAS dates - SAS numeric variables with formats like DATE9. That way VA will automatically recognise these variables as dates and then you can use the VA data formatting options including the months as text.
I tried but I'm not seeing month as text option. It's showing all numerical functions, such as comma, float, dollar, etc. When I used SAS VA month function from the proper SAS Date, it has created 1,2,3,4, .... as month. Not able to convert them as January, February, ...etc.
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.
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.