<?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. Help! in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Date-Format-Help/m-p/54779#M15199</link>
    <description>Hi Cynthia!&lt;BR /&gt;
&lt;BR /&gt;
I haven given this a try and this works awesome! &lt;BR /&gt;
&lt;BR /&gt;
Cheers,&lt;BR /&gt;
Yennie</description>
    <pubDate>Wed, 10 Feb 2010 05:50:15 GMT</pubDate>
    <dc:creator>Yennie</dc:creator>
    <dc:date>2010-02-10T05:50:15Z</dc:date>
    <item>
      <title>Date Format. Help!</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Date-Format-Help/m-p/54777#M15197</link>
      <description>Hi People!&lt;BR /&gt;
&lt;BR /&gt;
I have this tiny macro that says &lt;BR /&gt;
%Let MonYear = %sysfunc(putn(%sysfunc(intnx(Month,%sysfunc(date()),+0)),date5.));&lt;BR /&gt;
&lt;BR /&gt;
Data MyTable_&amp;amp;Monyear.;&lt;BR /&gt;
	Set ABCTable;&lt;BR /&gt;
Run;&lt;BR /&gt;
&lt;BR /&gt;
I am hoping to get the date format as MyTable_Feb2010 (which is today's date). Do you guys know how to change this macro script around? &lt;BR /&gt;
&lt;BR /&gt;
also... What about... in another way... if I want it to be Mytable1002 instead where 10 is the year and 02 is the month, then how should the script be???&lt;BR /&gt;
&lt;BR /&gt;
Hoping you guys can help me out on this one! &lt;BR /&gt;
&lt;BR /&gt;
Cheers!</description>
      <pubDate>Wed, 10 Feb 2010 04:23:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Date-Format-Help/m-p/54777#M15197</guid>
      <dc:creator>Yennie</dc:creator>
      <dc:date>2010-02-10T04:23:07Z</dc:date>
    </item>
    <item>
      <title>Re: Date Format. Help!</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Date-Format-Help/m-p/54778#M15198</link>
      <description>Hi:&lt;BR /&gt;
  If you look at the documentation,&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/z3514sysfunc.htm#a000384574" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/z3514sysfunc.htm#a000384574&lt;/A&gt;&lt;BR /&gt;
you will see  that one of the arguments to %SYSFUNC is a format for a date variable. (As shown in the example, entitled ""Formatting the Current Date in a TITLE Statement.) But, even though the doc shows the example in a title statement, it would work in other situations, such as creating a filename.&lt;BR /&gt;
 &lt;BR /&gt;
  The SAS log from using %SYSFUNC as shown in the documentation is shown below.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia&lt;BR /&gt;
[pre]&lt;BR /&gt;
2979  ** One of the arguments to %SYSFUNC is a format for a date;&lt;BR /&gt;
2980  %let monyear = %sysfunc(date(),monyy5.);&lt;BR /&gt;
2981  %let yymm = %sysfunc(date(),yymmdd4.);&lt;BR /&gt;
2982&lt;BR /&gt;
2983  ** Use the macro variables with formats to create the file name;&lt;BR /&gt;
2984  %let fname1 = MyTable_&amp;amp;monyear;&lt;BR /&gt;
2985  %let fname2 = MyTable&amp;amp;yymm;&lt;BR /&gt;
2986&lt;BR /&gt;
2987  ** %PUT statements to show the file name;&lt;BR /&gt;
2988  %put monyear= &amp;amp;monyear fname1= &amp;amp;fname1;&lt;BR /&gt;
monyear= FEB10 fname1= MyTable_FEB10&lt;BR /&gt;
2989  %put yymm = &amp;amp;yymm fname2=&amp;amp;fname2;&lt;BR /&gt;
yymm = 1002 fname2=MyTable1002&lt;BR /&gt;
&lt;BR /&gt;
[/pre]</description>
      <pubDate>Wed, 10 Feb 2010 05:03:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Date-Format-Help/m-p/54778#M15198</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-02-10T05:03:03Z</dc:date>
    </item>
    <item>
      <title>Re: Date Format. Help!</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Date-Format-Help/m-p/54779#M15199</link>
      <description>Hi Cynthia!&lt;BR /&gt;
&lt;BR /&gt;
I haven given this a try and this works awesome! &lt;BR /&gt;
&lt;BR /&gt;
Cheers,&lt;BR /&gt;
Yennie</description>
      <pubDate>Wed, 10 Feb 2010 05:50:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Date-Format-Help/m-p/54779#M15199</guid>
      <dc:creator>Yennie</dc:creator>
      <dc:date>2010-02-10T05:50:15Z</dc:date>
    </item>
  </channel>
</rss>

