<?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 extension from todays date in months to create a date into future for in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-extension-from-todays-date-in-months-to-create-a-date-into/m-p/281619#M19348</link>
    <description>&lt;P&gt;So either this is a homework question or you have two accounts?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/Base-SAS-Programming/How-to-take-today-date-36-months-into-future/m-p/281339#M57036" target="_blank"&gt;https://communities.sas.com/t5/Base-SAS-Programming/How-to-take-today-date-36-months-into-future/m-p/281339#M57036&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 01 Jul 2016 04:44:41 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2016-07-01T04:44:41Z</dc:date>
    <item>
      <title>Date extension from todays date in months to create a date into future for</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-extension-from-todays-date-in-months-to-create-a-date-into/m-p/281607#M19346</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;im new to programming and only recently been trained in programming in SAS ( a couple of months )&lt;/P&gt;
&lt;P&gt;i have a code that i have been working on and im struck on the last part and would like to post for some ideas to test.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i want to create a variable called 'extended date' to add 36 months to today() date. this would be rolling. i also needed to created dates in past, that is the reason for the year=2010&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data indata;&lt;BR /&gt; do year=2010 to year(today());&lt;BR /&gt; do month=1 to month(today());&lt;BR /&gt; SAS_date=mdy(month,1,year);&lt;/P&gt;
&lt;P&gt;output;&lt;BR /&gt; end;&lt;BR /&gt; end;&lt;/P&gt;
&lt;P&gt;format SAS_date date9.;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;my results so far is below to today()&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 144pt;" border="0" width="192" cellspacing="0" cellpadding="0"&gt;&lt;COLGROUP&gt;&lt;COL style="width: 48pt;" span="3" width="64" /&gt; &lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="64" height="20" style="height: 15.0pt; width: 48pt;"&gt;year&lt;/TD&gt;
&lt;TD width="64" style="width: 48pt;"&gt;month&lt;/TD&gt;
&lt;TD width="64" style="width: 48pt;"&gt;sas_date&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" align="right" style="height: 15.0pt;"&gt;2010&lt;/TD&gt;
&lt;TD align="right"&gt;1&lt;/TD&gt;
&lt;TD align="right" class="xl63"&gt;1-Jan-10&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" align="right" style="height: 15.0pt;"&gt;2010&lt;/TD&gt;
&lt;TD align="right"&gt;2&lt;/TD&gt;
&lt;TD align="right" class="xl63"&gt;1-Feb-10&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" align="right" style="height: 15.0pt;"&gt;2010&lt;/TD&gt;
&lt;TD align="right"&gt;3&lt;/TD&gt;
&lt;TD align="right" class="xl63"&gt;1-Mar-10&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" align="right" style="height: 15.0pt;"&gt;2010&lt;/TD&gt;
&lt;TD align="right"&gt;4&lt;/TD&gt;
&lt;TD align="right" class="xl63"&gt;1-Apr-10&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" align="right" style="height: 15.0pt;"&gt;2010&lt;/TD&gt;
&lt;TD align="right"&gt;5&lt;/TD&gt;
&lt;TD align="right" class="xl63"&gt;1-May-10&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" align="right" style="height: 15.0pt;"&gt;2010&lt;/TD&gt;
&lt;TD align="right"&gt;6&lt;/TD&gt;
&lt;TD align="right" class="xl63"&gt;1-Jun-10&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" align="right" style="height: 15.0pt;"&gt;2010&lt;/TD&gt;
&lt;TD align="right"&gt;7&lt;/TD&gt;
&lt;TD align="right" class="xl63"&gt;1-Jul-10&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" align="right" style="height: 15.0pt;"&gt;2011&lt;/TD&gt;
&lt;TD align="right"&gt;1&lt;/TD&gt;
&lt;TD align="right" class="xl63"&gt;1-Jan-11&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" align="right" style="height: 15.0pt;"&gt;2011&lt;/TD&gt;
&lt;TD align="right"&gt;2&lt;/TD&gt;
&lt;TD align="right" class="xl63"&gt;1-Feb-11&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" align="right" style="height: 15.0pt;"&gt;2011&lt;/TD&gt;
&lt;TD align="right"&gt;3&lt;/TD&gt;
&lt;TD align="right" class="xl63"&gt;1-Mar-11&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" align="right" style="height: 15.0pt;"&gt;2011&lt;/TD&gt;
&lt;TD align="right"&gt;4&lt;/TD&gt;
&lt;TD align="right" class="xl63"&gt;1-Apr-11&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" align="right" style="height: 15.0pt;"&gt;2011&lt;/TD&gt;
&lt;TD align="right"&gt;5&lt;/TD&gt;
&lt;TD align="right" class="xl63"&gt;1-May-11&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" align="right" style="height: 15.0pt;"&gt;2011&lt;/TD&gt;
&lt;TD align="right"&gt;6&lt;/TD&gt;
&lt;TD align="right" class="xl63"&gt;1-Jun-11&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" align="right" style="height: 15.0pt;"&gt;2011&lt;/TD&gt;
&lt;TD align="right"&gt;7&lt;/TD&gt;
&lt;TD align="right" class="xl63"&gt;1-Jul-11&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;ideal results would look something like this, taking today's date and then creating the next month for the next 36 months into the future&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;today() is always rolling to next month and extended date is taking today() and adding a month for 36 month into the future&lt;/P&gt;
&lt;TABLE width="302"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="64"&gt;year&lt;/TD&gt;
&lt;TD width="64"&gt;month&lt;/TD&gt;
&lt;TD width="71"&gt;sas_date&lt;/TD&gt;
&lt;TD width="103"&gt;extended date&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;2016&lt;/TD&gt;
&lt;TD&gt;2&lt;/TD&gt;
&lt;TD&gt;1-Feb-16&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
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-Oct-16&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;2016&lt;/TD&gt;
&lt;TD&gt;6&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;1-Nov-16&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;2016&lt;/TD&gt;
&lt;TD&gt;6&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;1-Dec-16&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks&lt;/P&gt;
&lt;P&gt;Thiary&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jul 2016 02:33:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-extension-from-todays-date-in-months-to-create-a-date-into/m-p/281607#M19346</guid>
      <dc:creator>SASuserxx</dc:creator>
      <dc:date>2016-07-01T02:33:16Z</dc:date>
    </item>
    <item>
      <title>Re: Date extension from todays date in months to create a date into future for</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-extension-from-todays-date-in-months-to-create-a-date-into/m-p/281616#M19347</link>
      <description>&lt;P&gt;You have the code for incrementing 36 months from your previous question.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it the next 6 months your looking for? To the end of the year? I can see your output but don't understand the logic.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jul 2016 04:09:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-extension-from-todays-date-in-months-to-create-a-date-into/m-p/281616#M19347</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-07-01T04:09:17Z</dc:date>
    </item>
    <item>
      <title>Re: Date extension from todays date in months to create a date into future for</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-extension-from-todays-date-in-months-to-create-a-date-into/m-p/281619#M19348</link>
      <description>&lt;P&gt;So either this is a homework question or you have two accounts?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/Base-SAS-Programming/How-to-take-today-date-36-months-into-future/m-p/281339#M57036" target="_blank"&gt;https://communities.sas.com/t5/Base-SAS-Programming/How-to-take-today-date-36-months-into-future/m-p/281339#M57036&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jul 2016 04:44:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-extension-from-todays-date-in-months-to-create-a-date-into/m-p/281619#M19348</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-07-01T04:44:41Z</dc:date>
    </item>
    <item>
      <title>Re: Date extension from todays date in months to create a date into future for</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-extension-from-todays-date-in-months-to-create-a-date-into/m-p/281621#M19349</link>
      <description>&lt;P&gt;this is not me, i only have one account.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jul 2016 06:14:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-extension-from-todays-date-in-months-to-create-a-date-into/m-p/281621#M19349</guid>
      <dc:creator>SASuserxx</dc:creator>
      <dc:date>2016-07-01T06:14:45Z</dc:date>
    </item>
    <item>
      <title>Re: Date extension from todays date in months to create a date into future for</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-extension-from-todays-date-in-months-to-create-a-date-into/m-p/281622#M19350</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;im trying to create a date from today&amp;nbsp;()&amp;nbsp;to 36 month forward into the future.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;those dates are from the past as i also need to get a date from a certain date in the past to today. this part i already figured out&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jul 2016 06:16:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-extension-from-todays-date-in-months-to-create-a-date-into/m-p/281622#M19350</guid>
      <dc:creator>SASuserxx</dc:creator>
      <dc:date>2016-07-01T06:16:42Z</dc:date>
    </item>
    <item>
      <title>Re: Date extension from todays date in months to create a date into future for</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-extension-from-todays-date-in-months-to-create-a-date-into/m-p/281624#M19351</link>
      <description>&lt;P&gt;As shown in the other thread that was referenced, use the intnx() function to increment dates.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jul 2016 06:29:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-extension-from-todays-date-in-months-to-create-a-date-into/m-p/281624#M19351</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-07-01T06:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: Date extension from todays date in months to create a date into future for</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-extension-from-todays-date-in-months-to-create-a-date-into/m-p/281628#M19352</link>
      <description>&lt;P&gt;Why are the questions essentially identical?&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jul 2016 06:35:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-extension-from-todays-date-in-months-to-create-a-date-into/m-p/281628#M19352</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-07-01T06:35:31Z</dc:date>
    </item>
    <item>
      <title>Re: Date extension from todays date in months to create a date into future for</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-extension-from-todays-date-in-months-to-create-a-date-into/m-p/281629#M19353</link>
      <description>&lt;P&gt;i think maybe a friend is trying to help me and i didnt know they also posted here&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jul 2016 06:36:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-extension-from-todays-date-in-months-to-create-a-date-into/m-p/281629#M19353</guid>
      <dc:creator>SASuserxx</dc:creator>
      <dc:date>2016-07-01T06:36:30Z</dc:date>
    </item>
    <item>
      <title>Re: Date extension from todays date in months to create a date into future for</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-extension-from-todays-date-in-months-to-create-a-date-into/m-p/281637#M19354</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data want;
Do I=1 to 36;

    Date=INTNX ('month', today(), I, 'b');
    OUTPUT;

end;&lt;BR /&gt;format date date9.;
Run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This creates a dataset with dates incrementing up to 36 months in the future.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jul 2016 06:55:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-extension-from-todays-date-in-months-to-create-a-date-into/m-p/281637#M19354</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-07-01T06:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: Date extension from todays date in months to create a date into future for</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-extension-from-todays-date-in-months-to-create-a-date-into/m-p/281639#M19355</link>
      <description>&lt;P&gt;hello Reeza,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks, this helps. Tested,it created the next 36 months.&lt;/P&gt;
&lt;P&gt;i will combine by code to get historical dates and future dates&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thank you for your help!!!!...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jul 2016 06:58:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-extension-from-todays-date-in-months-to-create-a-date-into/m-p/281639#M19355</guid>
      <dc:creator>SASuserxx</dc:creator>
      <dc:date>2016-07-01T06:58:00Z</dc:date>
    </item>
  </channel>
</rss>

