<?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 Date Format in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Date-Format/m-p/434791#M107937</link>
    <description>&lt;P&gt;Halo all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am quite new in SAS and I need your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is anybody know how to change these date into DATE9 format&amp;nbsp;in macro variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%LET&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; date = &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%scan&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;("$Date: 2018/02/07 08:50:51 $",2,': ');&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%put&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; &amp;amp;date.;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;Thank you for your help&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 07 Feb 2018 09:22:58 GMT</pubDate>
    <dc:creator>WPH</dc:creator>
    <dc:date>2018-02-07T09:22:58Z</dc:date>
    <item>
      <title>Date Format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-Format/m-p/434791#M107937</link>
      <description>&lt;P&gt;Halo all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am quite new in SAS and I need your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is anybody know how to change these date into DATE9 format&amp;nbsp;in macro variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%LET&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; date = &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%scan&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;("$Date: 2018/02/07 08:50:51 $",2,': ');&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%put&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; &amp;amp;date.;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;Thank you for your help&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2018 09:22:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-Format/m-p/434791#M107937</guid>
      <dc:creator>WPH</dc:creator>
      <dc:date>2018-02-07T09:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: Date Format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-Format/m-p/434796#M107939</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _NULL_;
    dt=input("&amp;amp;date.",yymmdd10.);
    call symput("date",put(dt,date9.));
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Feb 2018 10:02:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-Format/m-p/434796#M107939</guid>
      <dc:creator>gamotte</dc:creator>
      <dc:date>2018-02-07T10:02:30Z</dc:date>
    </item>
    <item>
      <title>Re: Date Format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-Format/m-p/434799#M107942</link>
      <description>&lt;P&gt;Its not a good idea to put data into macro variables.&amp;nbsp; Macro is nothing more than a text find and replace system, which will make your code longer and harder to maintain if you do not use it for its purpose.&amp;nbsp; To do your request, you could have lots of messy macro code, or use Base SAS which is what should be used for data:&lt;/P&gt;
&lt;PRE&gt;data _null_;
  call symput('date',put(input(scan('$Date: 2018/02/07 08:50:51 $',2,": "),yymmdd10.),date9.));
run;

%put &amp;amp;date.;&lt;/PRE&gt;
&lt;P&gt;If your quite new to SAS then step 1 is learn Base SAS - which is the actually running language, then learn the additional text replacement service macro later.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2018 10:06:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-Format/m-p/434799#M107942</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-02-07T10:06:54Z</dc:date>
    </item>
    <item>
      <title>Re: Date Format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-Format/m-p/434823#M107953</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%LET date = %sysfunc(inputn(%scan("$Date: 2018/02/07 08:50:51 $",2,%str( )),yymmdd10.),date9.);

%put &amp;amp;date.;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Feb 2018 12:27:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-Format/m-p/434823#M107953</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2018-02-07T12:27:42Z</dc:date>
    </item>
  </channel>
</rss>

