<?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: Creating a new date when two diseases are first present in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-new-date-when-two-diseases-are-first-present/m-p/180490#M265091</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wouldn't it just be max(diabetes_date,hypertension_date)?&amp;nbsp; I think the max function propagates null values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Apr 2014 19:26:58 GMT</pubDate>
    <dc:creator>DBailey</dc:creator>
    <dc:date>2014-04-15T19:26:58Z</dc:date>
    <item>
      <title>Creating a new date when two diseases are first present</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-new-date-when-two-diseases-are-first-present/m-p/180489#M265090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;If I had a dataset that contained a Diabetes_Date and a Hypertension_date like the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Diabetes_date&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Hypertension_date&lt;/P&gt;&lt;P&gt;111&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4/5/05&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7/10/06&lt;/P&gt;&lt;P&gt;222&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3/4/14&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9/6/10&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need a new variable date that would list the date at which they had both Diabetes and Hypertension.&amp;nbsp; So for the above example it would be 7/10/06 for 111 and the 222 ID would be 3/4/14.&amp;nbsp; I know I could do a few if statements to accomplish this, but wondering if there are other easy methods.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks so much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Apr 2014 19:18:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-new-date-when-two-diseases-are-first-present/m-p/180489#M265090</guid>
      <dc:creator>sashelpwanted</dc:creator>
      <dc:date>2014-04-15T19:18:15Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a new date when two diseases are first present</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-new-date-when-two-diseases-are-first-present/m-p/180490#M265091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wouldn't it just be max(diabetes_date,hypertension_date)?&amp;nbsp; I think the max function propagates null values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Apr 2014 19:26:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-new-date-when-two-diseases-are-first-present/m-p/180490#M265091</guid>
      <dc:creator>DBailey</dc:creator>
      <dc:date>2014-04-15T19:26:58Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a new date when two diseases are first present</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-new-date-when-two-diseases-are-first-present/m-p/180491#M265092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, I do not think max() propagates nulls unless all the parameters are null.&amp;nbsp; In fact I use max(value, 0) to set missing values to zero.&amp;nbsp; You need the N() function as well to count the number of non null values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If n(&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px; background-color: #ffffff;"&gt;Diabetes_date&lt;/SPAN&gt;, &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px; background-color: #ffffff;"&gt;hypertension_date&lt;/SPAN&gt;) = 2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; then combined Date = &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px; background-color: #ffffff;"&gt;max(diabetes_date,hypertension_date)&lt;/SPAN&gt; ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Apr 2014 10:11:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-new-date-when-two-diseases-are-first-present/m-p/180491#M265092</guid>
      <dc:creator>RichardinOz</dc:creator>
      <dc:date>2014-04-16T10:11:44Z</dc:date>
    </item>
  </channel>
</rss>

