title: Formatting a &macro variable date in SAS E-Guide
body: <p>The point of the following code is to assign the date of the previous week's Sunday and the date of the previous week's Saturday to a macro variable. I need them in <strong>date9.</strong> format. </p>
  
  <p>In the data step on line 48, I'm formatting them to <strong>date9.</strong>, but they're losing that formatting when called outside of the data step. They're just showing up as the default SAS date format.</p>
  
  <p>What am I missing here? </p>
  
  <pre><code>44         data _null_;
  45             curDate= today();
  46             sunday = intnx('week1.1',curDate,-1,'Begin');
  47             saturday = intnx('week1.1',curDate,-1,'End');
  48             format _all_ date9.;
  49             put (_all_)(=/);
  50          call symput('sunday',sunday);
  51          call symput('saturday',saturday);
  52          
  53         run;
  
  NOTE: Numeric values have been converted to character values at the places given     by: (Line):(Column).
        50:23   51:25   
  
  curDate=23JUN2016
  sunday=12JUN2016
  saturday=18JUN2016
  NOTE: DATA statement used (Total process time):
        real time           0.00 seconds
        cpu time            0.00 seconds
  
  
  54          %PUT &amp;sunday;
  20617
  </code></pre>