title: How to convert date in SAS to YYYYMMDD number format
body: <p>In test_1 table, the <code>my_date</code> field is a "DATE9." format.<br>
  I would like to convert it to a pure numeric format (<em>number</em> length 8) which is of the form <code>YYYYMMDD</code>.<br>
  I would also like to do this in a proc sql statement ideally.</p>
  
  <p>Here's what I have so far.<br>
  Clearly I need something to manipulate the my_date field.</p>
  
  <pre><code>rsubmit;
  proc sql;
      CREATE TABLE test_2 AS      
      SELECT
          my_date
      FROM
          test_1
      ;
  quit;    
  endrsubmit;
  </code></pre>
  
  <p>FYI: I am finding it quite difficult to understand the various methods in SAS.</p>
  
  <p>To clarify, the field should actually be a number, not a character field, nor a date.</p>