<?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: Getting a date in the future in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Getting-a-date-in-the-future/m-p/48905#M10105</link>
    <description>INTNX should do the trick.  One solution might be something like:&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
data adv;&lt;BR /&gt;
date=today();&lt;BR /&gt;
a1=1; a2=2; a3=3; &lt;BR /&gt;
adv1 = intnx('month',date,a1)+24; &lt;BR /&gt;
adv2 = intnx('month',date,a2)+24; &lt;BR /&gt;
adv3 = intnx('month',date,a3)+24;&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]</description>
    <pubDate>Wed, 14 Jul 2010 06:32:49 GMT</pubDate>
    <dc:creator>ArtC</dc:creator>
    <dc:date>2010-07-14T06:32:49Z</dc:date>
    <item>
      <title>Getting a date in the future</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Getting-a-date-in-the-future/m-p/48904#M10104</link>
      <description>Hi All&lt;BR /&gt;
&lt;BR /&gt;
How do I go about getting a data in the future and assigning this to a value.  For example, I have to read in a list of value, e.g. A1, A2, A3 - each of these will have different due terms - e.g.  A1 = Payable in 1 mth on the 25th, A2 = Payable in 2 mth on the 25th      etc&lt;BR /&gt;
&lt;BR /&gt;
So, how do I get the 25th of the following TWO and THREE months to assign to a value.  I was thinking of using INTX function but don't that will work.&lt;BR /&gt;
&lt;BR /&gt;
Thanks for your help.&lt;BR /&gt;
Shelton.</description>
      <pubDate>Wed, 14 Jul 2010 04:28:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Getting-a-date-in-the-future/m-p/48904#M10104</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-07-14T04:28:47Z</dc:date>
    </item>
    <item>
      <title>Re: Getting a date in the future</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Getting-a-date-in-the-future/m-p/48905#M10105</link>
      <description>INTNX should do the trick.  One solution might be something like:&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
data adv;&lt;BR /&gt;
date=today();&lt;BR /&gt;
a1=1; a2=2; a3=3; &lt;BR /&gt;
adv1 = intnx('month',date,a1)+24; &lt;BR /&gt;
adv2 = intnx('month',date,a2)+24; &lt;BR /&gt;
adv3 = intnx('month',date,a3)+24;&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Wed, 14 Jul 2010 06:32:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Getting-a-date-in-the-future/m-p/48905#M10105</guid>
      <dc:creator>ArtC</dc:creator>
      <dc:date>2010-07-14T06:32:49Z</dc:date>
    </item>
    <item>
      <title>Re: Getting a date in the future</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Getting-a-date-in-the-future/m-p/48906#M10106</link>
      <description>Hi. INTX function has the fourth argument 'sameday' can obtain the same day after two or three months.&lt;BR /&gt;
&lt;BR /&gt;
followdate = intnx('month',A1,2,'sameday');</description>
      <pubDate>Wed, 14 Jul 2010 11:55:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Getting-a-date-in-the-future/m-p/48906#M10106</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2010-07-14T11:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: Getting a date in the future</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Getting-a-date-in-the-future/m-p/48907#M10107</link>
      <description>thanks all for your help - I did the following:&lt;BR /&gt;
&lt;BR /&gt;
IF NPAYTERM = 'A1' THEN DO;               &lt;BR /&gt;
NEXT_MON=INTNX('MONTH',DOCDATE,1) + 24;   &lt;BR /&gt;
R3DUED=PUT(NEXT_MON,YYMMDD10.);           &lt;BR /&gt;
SUBSTR(R3DUED,5,1) = '-';                 &lt;BR /&gt;
SUBSTR(R3DUED,8,1) = '-';                 &lt;BR /&gt;
PUT R3DUED;                               &lt;BR /&gt;
END;                                      &lt;BR /&gt;
                                          &lt;BR /&gt;
ELSE IF NPAYTERM = 'A2' THEN DO;          &lt;BR /&gt;
TWOMONTS=INTNX('MONTH',DOCDATE,2) + 24;   &lt;BR /&gt;
R3DUED=PUT(TWOMONTS,YYMMDD10.);           &lt;BR /&gt;
SUBSTR(R3DUED,5,1) = '-';                 &lt;BR /&gt;
SUBSTR(R3DUED,8,1) = '-';                 &lt;BR /&gt;
PUT R3DUED;                               &lt;BR /&gt;
END;                                      &lt;BR /&gt;
&lt;BR /&gt;
etc etc&lt;BR /&gt;
&lt;BR /&gt;
Thanks again.</description>
      <pubDate>Mon, 19 Jul 2010 04:20:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Getting-a-date-in-the-future/m-p/48907#M10107</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-07-19T04:20:23Z</dc:date>
    </item>
    <item>
      <title>Re: Getting a date in the future</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Getting-a-date-in-the-future/m-p/48908#M10108</link>
      <description>To show a dash as the separator consider the format yymmddd10. (notice the third d).&lt;BR /&gt;
&lt;BR /&gt;
If all you want to do is write the value to the LOG, then you can avoid creating the variable R3DUED by using this format in the PUT statement.&lt;BR /&gt;
[pre]&lt;BR /&gt;
put next_mon yymmddd10.;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
I always try to second guess the need to create a date stored in a character variable.</description>
      <pubDate>Tue, 20 Jul 2010 02:18:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Getting-a-date-in-the-future/m-p/48908#M10108</guid>
      <dc:creator>ArtC</dc:creator>
      <dc:date>2010-07-20T02:18:51Z</dc:date>
    </item>
  </channel>
</rss>

