<?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: Grouping people by the dates they enrolled in a study. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Grouping-people-by-the-dates-they-enrolled-in-a-study/m-p/749949#M235796</link>
    <description>Thank you so much for your quick reply! This worked perfectly!</description>
    <pubDate>Wed, 23 Jun 2021 18:49:36 GMT</pubDate>
    <dc:creator>pramenon1</dc:creator>
    <dc:date>2021-06-23T18:49:36Z</dc:date>
    <item>
      <title>Grouping people by the dates they enrolled in a study.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Grouping-people-by-the-dates-they-enrolled-in-a-study/m-p/749937#M235787</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have data regarding when patients enrolled in study from 01/01/1992 to 12/31/2019. I am trying to put these patients into 4 groups like this below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATA dtanl.hivcancerdta_enrlgrp;&lt;BR /&gt;set dtanl.hivcancerdta;&lt;BR /&gt;format lastdate date9.;&lt;BR /&gt;enrolldt = DATEPART (lastdate);&lt;BR /&gt;IF enrolldt = . THEN enrlgrp = .;&lt;BR /&gt;ELSE IF '01JAN1992'D &amp;lt;= enrolldt &amp;lt; '01JAN1998'D THEN enrlgrp = 1;&lt;BR /&gt;ELSE IF '01JAN1998'D &amp;lt;= enrolldt &amp;lt; '01JAN2004'D THEN enrlgrp = 2;&lt;BR /&gt;ELSE IF '01JAN2004'D &amp;lt;= enrolldt &amp;lt; '01JAN2010'D THEN enrlgrp = 3;&lt;BR /&gt;ELSE IF enrolldt &amp;gt;= '01JAN2010'D THEN enrlgrp = 4;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When doing this, the variable enrolldt fills as 0 and enrlgrp fills as missing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was having trouble with this and looked at other SAS community threads detailing similar issues but no matter what I tried it isnt working. Any help would be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jun 2021 18:24:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Grouping-people-by-the-dates-they-enrolled-in-a-study/m-p/749937#M235787</guid>
      <dc:creator>pramenon1</dc:creator>
      <dc:date>2021-06-23T18:24:48Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping people by the dates they enrolled in a study.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Grouping-people-by-the-dates-they-enrolled-in-a-study/m-p/749944#M235792</link>
      <description>&lt;P&gt;DATEPART is to convert SAS datime values to SAS date values. I suspect that lastdate is already a SAS date value. Try replacing&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;enrolldt = DATEPART (lastdate);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;with&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;enrolldt = lastdate;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jun 2021 18:42:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Grouping-people-by-the-dates-they-enrolled-in-a-study/m-p/749944#M235792</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2021-06-23T18:42:23Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping people by the dates they enrolled in a study.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Grouping-people-by-the-dates-they-enrolled-in-a-study/m-p/749949#M235796</link>
      <description>Thank you so much for your quick reply! This worked perfectly!</description>
      <pubDate>Wed, 23 Jun 2021 18:49:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Grouping-people-by-the-dates-they-enrolled-in-a-study/m-p/749949#M235796</guid>
      <dc:creator>pramenon1</dc:creator>
      <dc:date>2021-06-23T18:49:36Z</dc:date>
    </item>
  </channel>
</rss>

