<?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 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/date-format/m-p/355162#M83188</link>
    <description>&lt;P&gt;Why. &amp;nbsp;All that will do is make your coding efforts difficult. &amp;nbsp;Either have one dataset with date as a column - this way you only have one dataset to program against but still have date information available - or have mutiple datasets, but call them something generic = ab002_1-ab002_xx - this way you can use lists of datasets, and short cuts to access them all (but having one dataset is far far simpler than anything else).&lt;/P&gt;
&lt;P&gt;Do note that you might want "output" with the date on - this does not however define how you can work internally.&lt;/P&gt;</description>
    <pubDate>Tue, 02 May 2017 09:06:29 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2017-05-02T09:06:29Z</dc:date>
    <item>
      <title>date format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/date-format/m-p/355136#M83179</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want the dataset name to be created with year and month format,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ex.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ab002_201705 ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data ab002_&amp;amp;sysyear&amp;amp;sysmonth is not giving desired result&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2017 06:53:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/date-format/m-p/355136#M83179</guid>
      <dc:creator>SAS_INFO</dc:creator>
      <dc:date>2017-05-02T06:53:33Z</dc:date>
    </item>
    <item>
      <title>Re: date format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/date-format/m-p/355139#M83181</link>
      <description>&lt;P&gt;First do the calculations in a data step, then save the result to a macro variable, and then use that for the dataset name:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
myyear = year(today());
mymonth = month(today());
length string $6;
string = put(myyear,z4.) !! put(mymonth,z2.);
call symput('mymonth',string);
run;

%put "mymonth=&amp;amp;mymonth."; /* for control */

data ab002_&amp;amp;mymonth.;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This way you have full control over the formatting of the string.&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2017 07:03:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/date-format/m-p/355139#M83181</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-05-02T07:03:56Z</dc:date>
    </item>
    <item>
      <title>Re: date format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/date-format/m-p/355141#M83182</link>
      <description>thank u , KurtBremsar</description>
      <pubDate>Tue, 02 May 2017 07:09:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/date-format/m-p/355141#M83182</guid>
      <dc:creator>SAS_INFO</dc:creator>
      <dc:date>2017-05-02T07:09:14Z</dc:date>
    </item>
    <item>
      <title>Re: date format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/date-format/m-p/355162#M83188</link>
      <description>&lt;P&gt;Why. &amp;nbsp;All that will do is make your coding efforts difficult. &amp;nbsp;Either have one dataset with date as a column - this way you only have one dataset to program against but still have date information available - or have mutiple datasets, but call them something generic = ab002_1-ab002_xx - this way you can use lists of datasets, and short cuts to access them all (but having one dataset is far far simpler than anything else).&lt;/P&gt;
&lt;P&gt;Do note that you might want "output" with the date on - this does not however define how you can work internally.&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2017 09:06:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/date-format/m-p/355162#M83188</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-05-02T09:06:29Z</dc:date>
    </item>
  </channel>
</rss>

