Hello,
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.
Thx.
This is a screenshot from VA 7.4 of the format options for a SAS date in the Data Source Pane - is this what you are trying?
okay, I was looking inside the designer. Thanks for the info.
Just to clarify the screenshot is from the Designer data source pane
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.