title: Boxplots where date grouped by year
body: <p>I recently asked a <a href="https://stackoverflow.com/questions/28216748/group-summary-statistics-by-year-based-on-a-date-field">question</a> about grouping in SAS. Drawing on that question, and using the same data set, I am struggling to make a box plot.</p>
  
  <p>The data look like this:</p>
  
  <pre><code>Date    Close   Volume
  12/31/2014  222.41  2402097
  12/30/2014  222.23  2903242
  12/29/2014  225.71  2811828
  12/26/2014  227.82  3327016
  12/24/2014  222.26  1333518
  12/23/2014  220.97  4513321
  12/22/2014  222.6   4806917
  12/19/2014  219.29  6910461
  12/18/2014  218.26  7483349
  12/17/2014  205.82  7367834
  12/16/2014  197.81  8426105
  12/15/2014  204.04  5218252
  12/12/2014  207 7173782
  </code></pre>
  
  <p>This data set actually covers two full years 2013 - 14. I would like a boxplot for each year and variable (Close and Volume).</p>
  
  <p>Here is what I tried:</p>
  
  <pre><code>proc boxplot data=tsla;
  class Date;
  format Date year.;
     plot Close*Date;
  run;
  </code></pre>
  
  <p>But that returns an error "</p>
  
  <pre><code>ERROR 180-322: Statement is not valid or it is used out of proper order.
  162  format Date year.;
  163     plot Close*Date;
  164  run;
  </code></pre>
  
  <p>"</p>
  
  <p>What's the right order then? </p>
  
  <p>How can I get SAS to give me 4 boxplots total? 2 variables (Close and Volume) and over two years (2013 - 14)?</p>