<?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 Generate month end dates (past/future) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Generate-month-end-dates-past-future/m-p/87105#M257104</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to write SAS code that can generate month end dates backward and forward. The goal is that the user enters a start date in a macro variable and specifies the periods (-1 going back one month and 1 going forward one month).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is my initial idea... The generated dates would be assigned a variable name and stored so they can be called throughout the code (e.g. date1=7/31/2013 , date2=8/31/2013...daten=m/dd/yy)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;%Let StrtDt = 6/30/2013;&lt;/P&gt;&lt;P&gt;%Let ProjLen = 10;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data DateGen (keep=y);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do i=1 to &amp;amp;ProjLen;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x=intnx('month',&amp;amp;StrtDt,0,'end');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y=x;&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Jul 2013 17:45:57 GMT</pubDate>
    <dc:creator>jbear</dc:creator>
    <dc:date>2013-07-23T17:45:57Z</dc:date>
    <item>
      <title>Generate month end dates (past/future)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Generate-month-end-dates-past-future/m-p/87105#M257104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to write SAS code that can generate month end dates backward and forward. The goal is that the user enters a start date in a macro variable and specifies the periods (-1 going back one month and 1 going forward one month).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is my initial idea... The generated dates would be assigned a variable name and stored so they can be called throughout the code (e.g. date1=7/31/2013 , date2=8/31/2013...daten=m/dd/yy)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;%Let StrtDt = 6/30/2013;&lt;/P&gt;&lt;P&gt;%Let ProjLen = 10;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data DateGen (keep=y);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do i=1 to &amp;amp;ProjLen;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x=intnx('month',&amp;amp;StrtDt,0,'end');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y=x;&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jul 2013 17:45:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Generate-month-end-dates-past-future/m-p/87105#M257104</guid>
      <dc:creator>jbear</dc:creator>
      <dc:date>2013-07-23T17:45:57Z</dc:date>
    </item>
    <item>
      <title>Re: Generate month end dates (past/future)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Generate-month-end-dates-past-future/m-p/87106#M257105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;%Let StrtDt=06/30/2013;&lt;/P&gt;&lt;P&gt;%Let ProjLen = 10;&lt;/P&gt;&lt;P&gt;data DateGen (keep=y);&lt;BR /&gt;do i=1 to &amp;amp;ProjLen;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x=intnx('month',input("&amp;amp;StrtDt",mmddyy10.),i,'end');&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y=x;&lt;BR /&gt;&amp;nbsp; format y mmddyy10.;&lt;BR /&gt;output;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;BR /&gt;proc print;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jul 2013 18:23:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Generate-month-end-dates-past-future/m-p/87106#M257105</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2013-07-23T18:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: Generate month end dates (past/future)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Generate-month-end-dates-past-future/m-p/87107#M257106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It worked! thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jul 2013 18:46:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Generate-month-end-dates-past-future/m-p/87107#M257106</guid>
      <dc:creator>jbear</dc:creator>
      <dc:date>2013-07-23T18:46:29Z</dc:date>
    </item>
  </channel>
</rss>

