<?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 Question on Date Macro in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Question-on-Date-Macro/m-p/131576#M35767</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there, I would like some help with the following macro:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;%let dt = %SYSFUNC(today(),MONYY.); &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This outputs the result: MAY13&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can this code be modified to show the previous month? i.e. APR13?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Secondly, how can I make it look a bit different? Let's say like: April 2013&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 May 2013 16:09:43 GMT</pubDate>
    <dc:creator>vomer</dc:creator>
    <dc:date>2013-05-07T16:09:43Z</dc:date>
    <item>
      <title>Question on Date Macro</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Question-on-Date-Macro/m-p/131576#M35767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there, I would like some help with the following macro:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;%let dt = %SYSFUNC(today(),MONYY.); &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This outputs the result: MAY13&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can this code be modified to show the previous month? i.e. APR13?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Secondly, how can I make it look a bit different? Let's say like: April 2013&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 May 2013 16:09:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Question-on-Date-Macro/m-p/131576#M35767</guid>
      <dc:creator>vomer</dc:creator>
      <dc:date>2013-05-07T16:09:43Z</dc:date>
    </item>
    <item>
      <title>Re: Question on Date Macro</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Question-on-Date-Macro/m-p/131577#M35768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV style="font-family: Courier New; font-size: 11pt;"&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;17&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%let&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; dt = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%sysfunc&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;(intnx(MONTH,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%SYSFUNC&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;(today()),-&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;MONYY.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;);&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;18&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%put&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; &amp;amp;=dt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;DT=APR13&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 May 2013 16:16:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Question-on-Date-Macro/m-p/131577#M35768</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2013-05-07T16:16:46Z</dc:date>
    </item>
    <item>
      <title>Re: Question on Date Macro</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Question-on-Date-Macro/m-p/131578#M35769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 May 2013 13:46:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Question-on-Date-Macro/m-p/131578#M35769</guid>
      <dc:creator>vomer</dc:creator>
      <dc:date>2013-05-08T13:46:40Z</dc:date>
    </item>
    <item>
      <title>Re: Question on Date Macro</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Question-on-Date-Macro/m-p/131579#M35770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I do not know of a single format to get "April 2013" output.&amp;nbsp; I think you will need to use two function calls.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px; font-family: 'Courier New'; color: #0000ff; background-color: #ffffff;"&gt;%let&lt;/SPAN&gt;&lt;SPAN style="font-size: 15px; font-family: 'Courier New'; color: #000000; background-color: #ffffff;"&gt; dt = &lt;/SPAN&gt;&lt;SPAN style="font-size: 15px; font-family: 'Courier New'; color: #0000ff; background-color: #ffffff;"&gt;%sysfunc&lt;/SPAN&gt;&lt;SPAN style="font-size: 15px; font-family: 'Courier New'; color: #000000; background-color: #ffffff;"&gt;(intnx(MONTH,&lt;/SPAN&gt;&lt;SPAN style="font-size: 15px; font-family: 'Courier New'; color: #0000ff; background-color: #ffffff;"&gt;%SYSFUNC&lt;/SPAN&gt;&lt;SPAN style="font-size: 15px; font-family: 'Courier New'; color: #000000; background-color: #ffffff;"&gt;(today()),-&lt;/SPAN&gt;&lt;SPAN style="font-size: 15px; font-family: 'Courier New'; color: #008080; background-color: #ffffff;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 15px; font-family: 'Courier New'; color: #000000; background-color: #ffffff;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 15px; font-family: 'Courier New'; color: #000000; background-color: #ffffff;"&gt;);&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px; font-family: 'Courier New'; color: #0000ff; background-color: #ffffff;"&gt;%let&lt;/SPAN&gt;&lt;SPAN style="font-size: 15px; font-family: 'Courier New'; color: #000000; background-color: #ffffff;"&gt; dt = &lt;/SPAN&gt;&lt;SPAN style="font-size: 15px; font-family: 'Courier New'; color: #0000ff; background-color: #ffffff;"&gt;%sysfunc&lt;/SPAN&gt;&lt;SPAN style="font-size: 15px; font-family: 'Courier New'; color: #000000; background-color: #ffffff;"&gt;(putn(&amp;amp;dt,monname.)) &lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em; font-size: 15px; font-family: 'Courier New'; color: #0000ff; background-color: #ffffff;"&gt;%sysfunc&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em; font-size: 15px; font-family: 'Courier New'; color: #000000; background-color: #ffffff;"&gt;(putn(&amp;amp;dt,year&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em; font-size: 15px; font-family: 'Courier New'; color: #008080; background-color: #ffffff;"&gt;.)&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em; font-size: 15px; font-family: 'Courier New'; color: #000000; background-color: #ffffff;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 May 2013 15:18:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Question-on-Date-Macro/m-p/131579#M35770</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-05-08T15:18:20Z</dc:date>
    </item>
    <item>
      <title>Re: Question on Date Macro</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Question-on-Date-Macro/m-p/131580#M35771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;%let x=%sysfunc(nldate('01dec2013'd,%nrstr(%B %Y)));
&lt;P&gt;%put x=&amp;amp;x;&lt;/P&gt;
&lt;P&gt;x=December 2013&lt;/P&gt;

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 12:38:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Question-on-Date-Macro/m-p/131580#M35771</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2013-06-05T12:38:25Z</dc:date>
    </item>
  </channel>
</rss>

