<?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 How to increase date in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-increase-date/m-p/34762#M1443</link>
    <description>I have a dataset which contains 3 variables that are patient id  date and doses ,I have to increase the date &lt;BR /&gt;
&lt;BR /&gt;
patient id     date         doses&lt;BR /&gt;
101          1jan2009   10mg&lt;BR /&gt;
&lt;BR /&gt;
I have to create a dataset like&lt;BR /&gt;
patient id   date         dose&lt;BR /&gt;
101          1jan2009  10mg&lt;BR /&gt;
101          2jan2009  10mg&lt;BR /&gt;
101          3jan2009  10mg&lt;BR /&gt;
101          4jan2009  10mg&lt;BR /&gt;
101          5jan2009 10mg&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
please tell me how I increase the date.&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Regards,&lt;BR /&gt;
Bina</description>
    <pubDate>Fri, 25 Dec 2009 05:51:52 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2009-12-25T05:51:52Z</dc:date>
    <item>
      <title>How to increase date</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-increase-date/m-p/34762#M1443</link>
      <description>I have a dataset which contains 3 variables that are patient id  date and doses ,I have to increase the date &lt;BR /&gt;
&lt;BR /&gt;
patient id     date         doses&lt;BR /&gt;
101          1jan2009   10mg&lt;BR /&gt;
&lt;BR /&gt;
I have to create a dataset like&lt;BR /&gt;
patient id   date         dose&lt;BR /&gt;
101          1jan2009  10mg&lt;BR /&gt;
101          2jan2009  10mg&lt;BR /&gt;
101          3jan2009  10mg&lt;BR /&gt;
101          4jan2009  10mg&lt;BR /&gt;
101          5jan2009 10mg&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
please tell me how I increase the date.&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Regards,&lt;BR /&gt;
Bina</description>
      <pubDate>Fri, 25 Dec 2009 05:51:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-increase-date/m-p/34762#M1443</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-12-25T05:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to increase date</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-increase-date/m-p/34763#M1444</link>
      <description>data have;&lt;BR /&gt;
infile datalines;&lt;BR /&gt;
input patient_id date anydtdte. doses $;&lt;BR /&gt;
format date date9.;&lt;BR /&gt;
datalines;&lt;BR /&gt;
101 1jan2009 10mg&lt;BR /&gt;
;&lt;BR /&gt;
&lt;BR /&gt;
data want(drop=i);&lt;BR /&gt;
set have;&lt;BR /&gt;
do i=1 to 5;&lt;BR /&gt;
output;&lt;BR /&gt;
date=date+1;&lt;BR /&gt;
end;&lt;BR /&gt;
run; &lt;BR /&gt;
&lt;BR /&gt;
proc print data=want;&lt;BR /&gt;
run;</description>
      <pubDate>Fri, 25 Dec 2009 08:21:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-increase-date/m-p/34763#M1444</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2009-12-25T08:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to increase date</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-increase-date/m-p/34764#M1445</link>
      <description>Most important for the OP to understand the SAS DATE variable (numeric) content - suggested link provided below from SAS DOC.&lt;BR /&gt;
&lt;BR /&gt;
Also, it is possible to work with a DO / END code paragraph incrementing a variable from a starting date (constant) to an ending date, as shown below:&lt;BR /&gt;
&lt;BR /&gt;
DO I=INTNX('MONTH,TODAY(),0) TO INTNX('MONTH',TODAY(),+1);&lt;BR /&gt;
  * YOUR CODE GOES HERE. ;&lt;BR /&gt;
END;&lt;BR /&gt;
&lt;BR /&gt;
Both the INTNX and INTCK functions are quite powerful in a DATA step process to increment and also generate ranges of date-variable values.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
SAS Language Reference: Concepts, About SAS Date, Time, and Datetime Values&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrcon/61722/HTML/default/a002200738.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrcon/61722/HTML/default/a002200738.htm&lt;/A&gt;</description>
      <pubDate>Fri, 25 Dec 2009 19:53:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-increase-date/m-p/34764#M1445</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-12-25T19:53:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to increase date</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-increase-date/m-p/34765#M1446</link>
      <description>Dear  Patrick,&lt;BR /&gt;
       Thanks a lot for your kind information this code work perfectly.&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Regards,&lt;BR /&gt;
Leena</description>
      <pubDate>Sun, 27 Dec 2009 13:31:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-increase-date/m-p/34765#M1446</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-12-27T13:31:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to increase date</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-increase-date/m-p/34766#M1447</link>
      <description>Dear sbb,&lt;BR /&gt;
      Thanks a lot for your kind information.&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Regards,&lt;BR /&gt;
Leena</description>
      <pubDate>Sun, 27 Dec 2009 13:33:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-increase-date/m-p/34766#M1447</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-12-27T13:33:26Z</dc:date>
    </item>
  </channel>
</rss>

