<?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: Person-years form a start to an end date in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Person-years-form-a-start-to-an-end-date/m-p/927081#M41600</link>
    <description>Sorry, I know there are no details but it is also not clear to me what others asked. I will ask soon.</description>
    <pubDate>Sun, 05 May 2024 09:09:55 GMT</pubDate>
    <dc:creator>NewUsrStat</dc:creator>
    <dc:date>2024-05-05T09:09:55Z</dc:date>
    <item>
      <title>Person-years form a start to an end date</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Person-years-form-a-start-to-an-end-date/m-p/927032#M41588</link>
      <description>&lt;P&gt;Hi guys,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;how can I calculate person-years from two dates for ex: 16FEB2019 and 08JAN2020?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have two variables with around 20.000 rows in my table.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you in advance.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best&lt;/P&gt;</description>
      <pubDate>Sat, 04 May 2024 15:36:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Person-years-form-a-start-to-an-end-date/m-p/927032#M41588</guid>
      <dc:creator>NewUsrStat</dc:creator>
      <dc:date>2024-05-04T15:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: Person-years form a start to an end date</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Person-years-form-a-start-to-an-end-date/m-p/927033#M41589</link>
      <description>&lt;P&gt;Please tell us the desired outcome for the case where the two variables have values 16FEB2019 and 08JAN2020&lt;/P&gt;</description>
      <pubDate>Sat, 04 May 2024 15:42:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Person-years-form-a-start-to-an-end-date/m-p/927033#M41589</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-05-04T15:42:17Z</dc:date>
    </item>
    <item>
      <title>Re: Person-years form a start to an end date</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Person-years-form-a-start-to-an-end-date/m-p/927035#M41590</link>
      <description>So I have to calculate the contribution (person years) of each patient to the study from 16FEB2019 when it was included, to 08JAN2020 the last date we have.</description>
      <pubDate>Sat, 04 May 2024 16:02:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Person-years-form-a-start-to-an-end-date/m-p/927035#M41590</guid>
      <dc:creator>NewUsrStat</dc:creator>
      <dc:date>2024-05-04T16:02:07Z</dc:date>
    </item>
    <item>
      <title>Re: Person-years form a start to an end date</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Person-years-form-a-start-to-an-end-date/m-p/927036#M41591</link>
      <description>&lt;P&gt;This gives the same information as before. This doesn't answer the question. How many person-years is that?&lt;/P&gt;</description>
      <pubDate>Sat, 04 May 2024 16:13:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Person-years-form-a-start-to-an-end-date/m-p/927036#M41591</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-05-04T16:13:44Z</dc:date>
    </item>
    <item>
      <title>Re: Person-years form a start to an end date</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Person-years-form-a-start-to-an-end-date/m-p/927040#M41593</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/134532"&gt;@NewUsrStat&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi guys,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;how can I calculate person-years from two dates for ex: 16FEB2019 and 08JAN2020?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have two variables with around 20.000 rows in my table.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you in advance.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You left out most (if not all) of the necessary information.&lt;/P&gt;
&lt;P&gt;You probably have some data in addition to those two dates.&amp;nbsp; What does the data look like?&amp;nbsp; Show a small example (2 or three persons) and what result you want for that example data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Will you have other date ranges you want to summarize? Where will the two dates needed to define those ranges coming from?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 04 May 2024 17:26:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Person-years-form-a-start-to-an-end-date/m-p/927040#M41593</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-05-04T17:26:47Z</dc:date>
    </item>
    <item>
      <title>Re: Person-years form a start to an end date</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Person-years-form-a-start-to-an-end-date/m-p/927052#M41594</link>
      <description>&lt;P&gt;proc sql ;&lt;BR /&gt;select sum(date2-date1)/365.25 &lt;BR /&gt;from have &lt;BR /&gt;;&lt;BR /&gt;quit ;&lt;/P&gt;</description>
      <pubDate>Sat, 04 May 2024 21:26:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Person-years-form-a-start-to-an-end-date/m-p/927052#M41594</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2024-05-04T21:26:08Z</dc:date>
    </item>
    <item>
      <title>Re: Person-years form a start to an end date</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Person-years-form-a-start-to-an-end-date/m-p/927072#M41599</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/134532"&gt;@NewUsrStat&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Based on your very lean description the two variables with dates you want to compare are in the same row. And what is a person-year? Below assumes it's just a count of calendar years.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data demo;
  dt1='16FEB2019'd;
  dt2='08JAN2020'd;
  format dt1 dt2 date9.;

  n_calendar_years=intck('year',dt1,dt2)+1;
run;
proc print data=demo;
run;
 &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Patrick_0-1714891001179.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/96184i9CBDE1E86D28947A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Patrick_0-1714891001179.png" alt="Patrick_0-1714891001179.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;What could really help to explain things and remove ambiguity is if you provide some representative sample data and show us the desired result.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 05 May 2024 06:37:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Person-years-form-a-start-to-an-end-date/m-p/927072#M41599</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2024-05-05T06:37:46Z</dc:date>
    </item>
    <item>
      <title>Re: Person-years form a start to an end date</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Person-years-form-a-start-to-an-end-date/m-p/927081#M41600</link>
      <description>Sorry, I know there are no details but it is also not clear to me what others asked. I will ask soon.</description>
      <pubDate>Sun, 05 May 2024 09:09:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Person-years-form-a-start-to-an-end-date/m-p/927081#M41600</guid>
      <dc:creator>NewUsrStat</dc:creator>
      <dc:date>2024-05-05T09:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: Person-years form a start to an end date</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Person-years-form-a-start-to-an-end-date/m-p/927082#M41601</link>
      <description>Thank you very much Patrick for your help!</description>
      <pubDate>Sun, 05 May 2024 09:10:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Person-years-form-a-start-to-an-end-date/m-p/927082#M41601</guid>
      <dc:creator>NewUsrStat</dc:creator>
      <dc:date>2024-05-05T09:10:37Z</dc:date>
    </item>
  </channel>
</rss>

