<?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: Macro code in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Macro-code/m-p/42634#M8729</link>
    <description>Use %SYSFUNC with the PUTN function.&lt;BR /&gt;
[pre]&lt;BR /&gt;
%let begindt = 18234;&lt;BR /&gt;
%put %sysfunc(putn(&amp;amp;begindt,ddmmyy10.));[/pre]</description>
    <pubDate>Wed, 01 Dec 2010 21:48:40 GMT</pubDate>
    <dc:creator>ArtC</dc:creator>
    <dc:date>2010-12-01T21:48:40Z</dc:date>
    <item>
      <title>Macro code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-code/m-p/42633#M8728</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I need to create a monthly report. For that i have created a macros,&lt;BR /&gt;
&lt;BR /&gt;
data _null_;&lt;BR /&gt;
call symput ('begindt',intnx('MONTH',today(),-4));&lt;BR /&gt;
call symput ('enddt',intnx('MONTH',today(),-3));&lt;BR /&gt;
call symput ('rdate',put(today(),date9.));&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
If run this code , %put &amp;amp;begindt ; am getting SAS date.&lt;BR /&gt;
If i want to see in ddmmyyyy means how to convert the code ?&lt;BR /&gt;
&lt;BR /&gt;
Pls anyone let me know..&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
sudha</description>
      <pubDate>Wed, 01 Dec 2010 21:25:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-code/m-p/42633#M8728</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-12-01T21:25:35Z</dc:date>
    </item>
    <item>
      <title>Re: Macro code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-code/m-p/42634#M8729</link>
      <description>Use %SYSFUNC with the PUTN function.&lt;BR /&gt;
[pre]&lt;BR /&gt;
%let begindt = 18234;&lt;BR /&gt;
%put %sysfunc(putn(&amp;amp;begindt,ddmmyy10.));[/pre]</description>
      <pubDate>Wed, 01 Dec 2010 21:48:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-code/m-p/42634#M8729</guid>
      <dc:creator>ArtC</dc:creator>
      <dc:date>2010-12-01T21:48:40Z</dc:date>
    </item>
    <item>
      <title>Re: Macro code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-code/m-p/42635#M8730</link>
      <description>Hi ,&lt;BR /&gt;
&lt;BR /&gt;
Thanks for your reply...&lt;BR /&gt;
But if i ran that syntax &lt;BR /&gt;
&lt;BR /&gt;
%put %sysfunc(putn(&amp;amp;begindt,ddmmyy10.));&lt;BR /&gt;
&lt;BR /&gt;
am getting an output as 01/01/1960..&lt;BR /&gt;
&lt;BR /&gt;
But i need to get an output as 09/01/2010.&lt;BR /&gt;
&lt;BR /&gt;
please let me know..&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
sudha</description>
      <pubDate>Wed, 01 Dec 2010 22:04:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-code/m-p/42635#M8730</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-12-01T22:04:14Z</dc:date>
    </item>
    <item>
      <title>Re: Macro code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-code/m-p/42636#M8731</link>
      <description>Hello Sudcha,&lt;BR /&gt;
&lt;BR /&gt;
I tried ArtC's suggestion on my computer. This code works as expected:&lt;BR /&gt;
[pre]&lt;BR /&gt;
data _null_;&lt;BR /&gt;
  call symput ('begindt',intnx('MONTH',today(),-4));&lt;BR /&gt;
run;&lt;BR /&gt;
%put begindt=%trim(&amp;amp;begindt);&lt;BR /&gt;
%put %sysfunc(putn(&amp;amp;begindt,ddmmyy10.));&lt;BR /&gt;
[/pre]&lt;BR /&gt;
Sincerely,&lt;BR /&gt;
SPR</description>
      <pubDate>Wed, 01 Dec 2010 22:16:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-code/m-p/42636#M8731</guid>
      <dc:creator>SPR</dc:creator>
      <dc:date>2010-12-01T22:16:08Z</dc:date>
    </item>
    <item>
      <title>Re: Macro code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-code/m-p/42637#M8732</link>
      <description>Yes am getting an exact output what am expecting !!&lt;BR /&gt;
&lt;BR /&gt;
Thank you  !!!</description>
      <pubDate>Wed, 01 Dec 2010 22:27:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-code/m-p/42637#M8732</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-12-01T22:27:20Z</dc:date>
    </item>
    <item>
      <title>Re: Macro code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-code/m-p/42638#M8733</link>
      <description>You can find out more about using SAS dates here.  I hope this helps.&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrcon/62955/HTML/default/viewer.htm#a002200738.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrcon/62955/HTML/default/viewer.htm#a002200738.htm&lt;/A&gt;</description>
      <pubDate>Mon, 13 Dec 2010 14:09:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-code/m-p/42638#M8733</guid>
      <dc:creator>PatrickG</dc:creator>
      <dc:date>2010-12-13T14:09:35Z</dc:date>
    </item>
  </channel>
</rss>

