I have an Orderdate column with datetime as its datatype. I have to create three data items Orderyear, Ordermonthname and Ordermonthnumber in the SAS Information Map Studio.
Orderdate : 01JUL2001:00:00:00
Orderyear : 2001
Ordermonthname : July
Ordermonthnumber : 07
I have created the Orderyear data item by configuring the format to DTYEAR under the Classification/Formats pane. It is working for me. I don’t know what format I have to specify for the data items Ordermonthname and Ordermonthnumber.
I still don't understand how i have to use this query inside the SAS Information Map Studio. I have given an example with Orderdate as mentioned in my previous post.
Actually, i have observation from the year 2001 to 2004. I have derived the columns Ordermonthnumber and Ordermonthname from the Orderdate column in the SAS Information Map Studio. If am using the query as mention by you, how i will pass the values for rest of the observations to the variable 'a'. I will use those columns in the SAS Web Report Studio to create reports.
Sorry, i am new to the SAS. Correct me if am wrong and kindly guide me.
The code snippet provided in the reply is just an example of how to use a DATETIME variable to derive the other informational values you required, all based on the OrderDate. If you need to use additional data strings with year and/or month_name, you can derive these new variables with an expression that uses the correct SAS function, as was demonstrated in the previous reply.
The SAS-hosted documentation at the SAS support http://support.sas.com/ website is available and you can search the site using the website SEARCH facility or using something like the Google advanced search argument below:
enterprise guide using sas functions site:sas.com
With this search, you will find SAS-hosted documentation and also supplemental technical and conference topic-related reference material.