<?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: Dates in SAS Health and Life Sciences</title>
    <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Dates/m-p/36464#M1230</link>
    <description>after create the data x;&lt;BR /&gt;
data y;&lt;BR /&gt;
retain diff 0 old 0 date 0;&lt;BR /&gt;
old=date;&lt;BR /&gt;
set  x;&lt;BR /&gt;
diff=date-old;&lt;BR /&gt;
run;</description>
    <pubDate>Sat, 30 Aug 2008 02:47:17 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2008-08-30T02:47:17Z</dc:date>
    <item>
      <title>Dates</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Dates/m-p/36460#M1226</link>
      <description>HI i have a data set i want the doff between two dates. here is the data set;&lt;BR /&gt;
&lt;BR /&gt;
data x;&lt;BR /&gt;
input date ddmmyy10.;&lt;BR /&gt;
cards;&lt;BR /&gt;
12/10/1980&lt;BR /&gt;
09/08/1983&lt;BR /&gt;
29/08/1985&lt;BR /&gt;
19/09/1989&lt;BR /&gt;
19/08/1989&lt;BR /&gt;
;&lt;BR /&gt;
i  want the difff between two dates</description>
      <pubDate>Wed, 06 Aug 2008 05:22:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Dates/m-p/36460#M1226</guid>
      <dc:creator>R_Win</dc:creator>
      <dc:date>2008-08-06T05:22:52Z</dc:date>
    </item>
    <item>
      <title>Re: Dates</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Dates/m-p/36461#M1227</link>
      <description>Hi:&lt;BR /&gt;
  The difference between dates on each observation??? You might investigate the LAG function.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Wed, 06 Aug 2008 12:39:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Dates/m-p/36461#M1227</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2008-08-06T12:39:30Z</dc:date>
    </item>
    <item>
      <title>Re: Dates</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Dates/m-p/36462#M1228</link>
      <description>If you want all possible difference between the dates, you can  use PROC SQL and do an outer join of x to x (This is often called a Cartesian Product).&lt;BR /&gt;
&lt;BR /&gt;
*untested code;&lt;BR /&gt;
PROC SQL;&lt;BR /&gt;
  CREATE TABLE AllDiff AS&lt;BR /&gt;
    SELECT a.date as date1,&lt;BR /&gt;
      b.date as date2,&lt;BR /&gt;
      Diff as date1-date1&lt;BR /&gt;
    FROM x AS a&lt;BR /&gt;
    OUTER JOIN  x AS b;&lt;BR /&gt;
QUIT;&lt;BR /&gt;
RUN;</description>
      <pubDate>Wed, 06 Aug 2008 20:38:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Dates/m-p/36462#M1228</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2008-08-06T20:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: Dates</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Dates/m-p/36463#M1229</link>
      <description>You may want to explore the SAS DATA STEP functions INTCK and also INTNX; the latter function can be helpful with generating DATE and DATETIME variable values, based on other variables.  For example, you can use a DATA STEP DO/END loop to generate (OUTPUT) SAS observations for each date value in a date-range, say for the past 12 months or 26 weeks.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Thu, 14 Aug 2008 15:00:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Dates/m-p/36463#M1229</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2008-08-14T15:00:09Z</dc:date>
    </item>
    <item>
      <title>Re: Dates</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Dates/m-p/36464#M1230</link>
      <description>after create the data x;&lt;BR /&gt;
data y;&lt;BR /&gt;
retain diff 0 old 0 date 0;&lt;BR /&gt;
old=date;&lt;BR /&gt;
set  x;&lt;BR /&gt;
diff=date-old;&lt;BR /&gt;
run;</description>
      <pubDate>Sat, 30 Aug 2008 02:47:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Dates/m-p/36464#M1230</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-08-30T02:47:17Z</dc:date>
    </item>
  </channel>
</rss>

