<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Date format on Proc Print in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Date-format-on-Proc-Print/m-p/489631#M127895</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think your code will work, you just need to replace &lt;FONT face="courier new,courier"&gt;b18&lt;/FONT&gt; with &lt;FONT face="courier new,courier"&gt;want&lt;/FONT&gt; in your &lt;FONT face="courier new,courier"&gt;proc pint&lt;/FONT&gt;, which is why you're getting an error about &lt;FONT face="courier new,courier"&gt;date&lt;/FONT&gt; being missing because it does not exist on &lt;FONT face="courier new,courier"&gt;b18&lt;/FONT&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amir.&lt;/P&gt;</description>
    <pubDate>Fri, 24 Aug 2018 15:05:16 GMT</pubDate>
    <dc:creator>Amir</dc:creator>
    <dc:date>2018-08-24T15:05:16Z</dc:date>
    <item>
      <title>Date format on Proc Print</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-format-on-Proc-Print/m-p/489612#M127885</link>
      <description>&lt;P&gt;I am trying to figure out how to get my data to print where month, day, and year are in the following format mm/dd/yyyy.&amp;nbsp; I used the catx statement I found in another post.&amp;nbsp; But&amp;nbsp;I don't know how to make date show in the print statement.&amp;nbsp; I thought I could just insert the word date in my proc print var statement, but SAS erred saying date is missing.&amp;nbsp; Below is what I have in my program.&amp;nbsp; Thank you for any suggestions. - Anne&amp;nbsp; I am using SAS 9.3.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data b18;

INFILE 'm:\OFFICE\18BR.DAT' LRECL=2538 MISSOVER;

inPUT

      @6 cert 6.
      @116 year 4.
      @120 mnth 2.
      @122 day 2.
      @314 rescty 2.
      @128 LOC_ST 2.
      @2425 OOSCERT 10.;

RUN;

 
data want;

   set b18;
   date=input(catx("/",mnth,day,year),mmddyy10.);
   format date mmddyy10.;

run;

 

PROC PRINTdata=b18;

VAR LOC_ST OOSCERT RESCTY mnth day year;

run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 24 Aug 2018 14:36:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-format-on-Proc-Print/m-p/489612#M127885</guid>
      <dc:creator>anner</dc:creator>
      <dc:date>2018-08-24T14:36:01Z</dc:date>
    </item>
    <item>
      <title>Re: Date format on Proc Print</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-format-on-Proc-Print/m-p/489617#M127886</link>
      <description>&lt;PRE&gt;data want;
   set b18;
   date=mdy(mnth,day,year);
   format date mmddyy10.;
run;

proc print data=want;
  var loc_st ooscert rescty date;
run;&lt;/PRE&gt;
&lt;P&gt;Please avoid coding in upper case.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Aug 2018 14:46:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-format-on-Proc-Print/m-p/489617#M127886</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-08-24T14:46:51Z</dc:date>
    </item>
    <item>
      <title>Re: Date format on Proc Print</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-format-on-Proc-Print/m-p/489626#M127892</link>
      <description>&lt;P&gt;Thank you for your quick reply RW9.&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Aug 2018 14:57:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-format-on-Proc-Print/m-p/489626#M127892</guid>
      <dc:creator>anner</dc:creator>
      <dc:date>2018-08-24T14:57:51Z</dc:date>
    </item>
    <item>
      <title>Re: Date format on Proc Print</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-format-on-Proc-Print/m-p/489631#M127895</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think your code will work, you just need to replace &lt;FONT face="courier new,courier"&gt;b18&lt;/FONT&gt; with &lt;FONT face="courier new,courier"&gt;want&lt;/FONT&gt; in your &lt;FONT face="courier new,courier"&gt;proc pint&lt;/FONT&gt;, which is why you're getting an error about &lt;FONT face="courier new,courier"&gt;date&lt;/FONT&gt; being missing because it does not exist on &lt;FONT face="courier new,courier"&gt;b18&lt;/FONT&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amir.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Aug 2018 15:05:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-format-on-Proc-Print/m-p/489631#M127895</guid>
      <dc:creator>Amir</dc:creator>
      <dc:date>2018-08-24T15:05:16Z</dc:date>
    </item>
  </channel>
</rss>

