title: Extract month and year for new variable
body: <p>I have a dataset with a variable that has the date of orders <code>(MMDDYY10.)</code>. I need to extract the month and year to look at orders by month--year because there are multiple years. I am vaguely aware of the <code>month</code> and <code>year</code> functions, but how can I use them together to create a new month bin?</p>
  
  <p>Ideally I would create a bin for each month/year so my output can look something like:</p>
  
  <pre><code>                    Date
  Item    2011OCT 2011NOV 2011DEC 2012JAN ...
  a         50      40       30     20
  b         15      20       25     30 
  c         1        2        3      4
  total    
  </code></pre>
  
  <p>Here is a sample code I created:</p>
  
  <pre><code>data dsstabl;
      set dsstabl;
      order_month = month(AC_DATE_OF_IMAGE_ORDER);
      order_year = year(AC_DATE_OF_IMAGE_ORDER);
      order = compress(order_month||order_year);
  run;
  
  proc freq data
      table item * _order;
  run;
  </code></pre>
  
  <p>Thanks in advance!</p>