<?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: Reg:Dates in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Reg-Dates/m-p/17815#M3434</link>
    <description>To increment a date value use the INTNX function.&lt;BR /&gt;
&lt;BR /&gt;
See: &lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/61724/HTML/default/a000212700.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/61724/HTML/default/a000212700.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
Greetings from Portugal.&lt;BR /&gt;
&lt;BR /&gt;
Daniel Santos at &lt;A href="http://www.cgd.pt" target="_blank"&gt;www.cgd.pt&lt;/A&gt;</description>
    <pubDate>Mon, 13 Apr 2009 13:30:29 GMT</pubDate>
    <dc:creator>DanielSantos</dc:creator>
    <dc:date>2009-04-13T13:30:29Z</dc:date>
    <item>
      <title>Reg:Dates</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reg-Dates/m-p/17813#M3432</link>
      <description>Hi&lt;BR /&gt;
  i have a date1 variable in this the observations was 05/01/07 and now i want to create another variable date2 and the observations shd be 05/02/07 up to end of that year as i have tried to add days to the first observation but the days diff from one month to anoher.&lt;BR /&gt;
&lt;BR /&gt;
Here is the output:&lt;BR /&gt;
&lt;BR /&gt;
date1     date2     date3    date4        .......                         date12&lt;BR /&gt;
05/01/07  05/02/07  05/03/07  05/04/07 ..........................  05/12/07

Message was edited by: Main</description>
      <pubDate>Mon, 13 Apr 2009 11:48:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reg-Dates/m-p/17813#M3432</guid>
      <dc:creator>R_Win</dc:creator>
      <dc:date>2009-04-13T11:48:58Z</dc:date>
    </item>
    <item>
      <title>Re: Reg:Dates</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reg-Dates/m-p/17814#M3433</link>
      <description>A SAS DATA step to increment your source variable by 1 while assigning a new DATE2 variable.  A DO loop within the DATA step will provide logic to both assign the new variable and issue an OUTPUT with each loop iteration.&lt;BR /&gt;
&lt;BR /&gt;
The SAS support  &lt;A href="http://support.sas.com/" target="_blank"&gt;http://support.sas.com/&lt;/A&gt;   website has SAS-hosted documentation and supplemental technical topic papers for reference.  I used the SEARCH facility at the site and found several references - some pasted below.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
Looking for a Date?  A Tutorial on Using SAS® Dates and Times&lt;BR /&gt;
Arthur L. Carpenter, California Occidental Consultants&lt;BR /&gt;
&lt;A href="http://www2.sas.com/proceedings/sugi30/255-30.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi30/255-30.pdf&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
Working with Dates in the SAS System&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/basess/58133/HTML/default/a001304321.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/basess/58133/HTML/default/a001304321.htm&lt;/A&gt;</description>
      <pubDate>Mon, 13 Apr 2009 13:28:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reg-Dates/m-p/17814#M3433</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-04-13T13:28:05Z</dc:date>
    </item>
    <item>
      <title>Re: Reg:Dates</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reg-Dates/m-p/17815#M3434</link>
      <description>To increment a date value use the INTNX function.&lt;BR /&gt;
&lt;BR /&gt;
See: &lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/61724/HTML/default/a000212700.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/61724/HTML/default/a000212700.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
Greetings from Portugal.&lt;BR /&gt;
&lt;BR /&gt;
Daniel Santos at &lt;A href="http://www.cgd.pt" target="_blank"&gt;www.cgd.pt&lt;/A&gt;</description>
      <pubDate>Mon, 13 Apr 2009 13:30:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reg-Dates/m-p/17815#M3434</guid>
      <dc:creator>DanielSantos</dc:creator>
      <dc:date>2009-04-13T13:30:29Z</dc:date>
    </item>
    <item>
      <title>Re: Reg:Dates</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reg-Dates/m-p/17816#M3435</link>
      <description>For consideration, using INTNX may be useful if incrementing a DATETIME variable by the date-portion, however having a DATE variable and incrementing sequentially (adding 1 increments to the next date) really does not require using INTNX.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Mon, 13 Apr 2009 13:36:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reg-Dates/m-p/17816#M3435</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-04-13T13:36:28Z</dc:date>
    </item>
    <item>
      <title>Re: Reg:Dates</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reg-Dates/m-p/17817#M3436</link>
      <description>Scott is right, to add 1 day, you just need to increment the DATE variable by 1.&lt;BR /&gt;
&lt;BR /&gt;
But, I think Main is having trouble to advance one month (quote: "...but the day diff from one month to anoher"), so in this case, INTNX would be the most simple way of doing it.&lt;BR /&gt;
&lt;BR /&gt;
Cheers from Portugal.&lt;BR /&gt;
&lt;BR /&gt;
Daniel Santos at &lt;A href="http://www.cgd.pt" target="_blank"&gt;www.cgd.pt&lt;/A&gt;</description>
      <pubDate>Mon, 13 Apr 2009 14:26:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reg-Dates/m-p/17817#M3436</guid>
      <dc:creator>DanielSantos</dc:creator>
      <dc:date>2009-04-13T14:26:33Z</dc:date>
    </item>
    <item>
      <title>Re: Reg:Dates</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reg-Dates/m-p/17818#M3437</link>
      <description>My mistake in not reading the post accurately.  You make an excellent choice with using INTNX, Daniel.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Mon, 13 Apr 2009 15:38:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reg-Dates/m-p/17818#M3437</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-04-13T15:38:54Z</dc:date>
    </item>
  </channel>
</rss>

