<?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: Most accurate way to count months between two date variables? in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Most-accurate-way-to-count-months-between-two-date-variables/m-p/617604#M19089</link>
    <description>This is the reason the standards were set at 30/90/180 re-admission rates though &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
    <pubDate>Wed, 15 Jan 2020 21:44:03 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2020-01-15T21:44:03Z</dc:date>
    <item>
      <title>Most accurate way to count months between two date variables?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Most-accurate-way-to-count-months-between-two-date-variables/m-p/617580#M19083</link>
      <description>&lt;P&gt;I've used the following code to calculate months between two date variables, however, I feel like it's not as accurate as I'd like it to be...&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data readms_dist2;&lt;BR /&gt;set readms_dist2;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Months_btwn_adms=intck('month', PRV_DC_DT, ADM_DT);&lt;/STRONG&gt;&lt;BR /&gt;Weeks_btwn_adms=intck('week', PRV_DC_DT, ADM_DT);&lt;BR /&gt;Days_btwn_adms=intck('day', PRV_DC_DT, ADM_DT);&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From my understanidng, the intck month function just counts if the date has "crossed" into the next month -&lt;/P&gt;
&lt;P&gt;So if had a PRV_DC_DT was january 1 2020 and the ADM_DT was january 30 2020, then the function would return 0.&lt;/P&gt;
&lt;P&gt;but if PRV_DC_DT was january 30 2020 and ADM_DT was february 1 2020 then the function would return 1. This is correct right? Well, that's not very accurate in calculating how many months between two dates, so what's my best option?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jan 2020 21:20:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Most-accurate-way-to-count-months-between-two-date-variables/m-p/617580#M19083</guid>
      <dc:creator>accintron</dc:creator>
      <dc:date>2020-01-15T21:20:14Z</dc:date>
    </item>
    <item>
      <title>Re: Most accurate way to count months between two date variables?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Most-accurate-way-to-count-months-between-two-date-variables/m-p/617582#M19084</link>
      <description>&lt;P&gt;Use 'C' for continuous&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Months_btwn_adms=intck('month', PRV_DC_DT, ADM_DT,'c');&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jan 2020 21:22:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Most-accurate-way-to-count-months-between-two-date-variables/m-p/617582#M19084</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-01-15T21:22:52Z</dc:date>
    </item>
    <item>
      <title>Re: Most accurate way to count months between two date variables?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Most-accurate-way-to-count-months-between-two-date-variables/m-p/617583#M19085</link>
      <description>Look at the fourth parameter in the INTCK() function.&lt;BR /&gt;&lt;BR /&gt;However, a month does not a standard definition, ie it could be 28 days or 31 days which can be a 10% difference there. It depends on what you need. You can use # of days or some other measure but it depends on what you're calculating and what the rules are.</description>
      <pubDate>Wed, 15 Jan 2020 21:22:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Most-accurate-way-to-count-months-between-two-date-variables/m-p/617583#M19085</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-01-15T21:22:52Z</dc:date>
    </item>
    <item>
      <title>Re: Most accurate way to count months between two date variables?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Most-accurate-way-to-count-months-between-two-date-variables/m-p/617597#M19087</link>
      <description>&lt;P&gt;Thank you!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jan 2020 21:36:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Most-accurate-way-to-count-months-between-two-date-variables/m-p/617597#M19087</guid>
      <dc:creator>accintron</dc:creator>
      <dc:date>2020-01-15T21:36:24Z</dc:date>
    </item>
    <item>
      <title>Re: Most accurate way to count months between two date variables?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Most-accurate-way-to-count-months-between-two-date-variables/m-p/617599#M19088</link>
      <description>&lt;P&gt;Yes, ok, I see that's what the other post did with the 'c' for continuous. This is good enough for my purposes &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jan 2020 21:38:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Most-accurate-way-to-count-months-between-two-date-variables/m-p/617599#M19088</guid>
      <dc:creator>accintron</dc:creator>
      <dc:date>2020-01-15T21:38:21Z</dc:date>
    </item>
    <item>
      <title>Re: Most accurate way to count months between two date variables?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Most-accurate-way-to-count-months-between-two-date-variables/m-p/617604#M19089</link>
      <description>This is the reason the standards were set at 30/90/180 re-admission rates though &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Wed, 15 Jan 2020 21:44:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Most-accurate-way-to-count-months-between-two-date-variables/m-p/617604#M19089</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-01-15T21:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: Most accurate way to count months between two date variables?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Most-accurate-way-to-count-months-between-two-date-variables/m-p/617761#M19126</link>
      <description>&lt;P&gt;Makes sense. Is there a way to count by 30 day intervals? Can you use that as the fourth parameter?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2020 14:31:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Most-accurate-way-to-count-months-between-two-date-variables/m-p/617761#M19126</guid>
      <dc:creator>accintron</dc:creator>
      <dc:date>2020-01-16T14:31:14Z</dc:date>
    </item>
    <item>
      <title>Re: Most accurate way to count months between two date variables?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Most-accurate-way-to-count-months-between-two-date-variables/m-p/617763#M19127</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/285053"&gt;@accintron&lt;/a&gt;&amp;nbsp; Not quite using the fourth argument. But you can use an Interval Multiplier to Create a Custom Interval.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example &lt;STRONG&gt;day30&lt;/STRONG&gt;&amp;nbsp;as the interval in your case&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Months_btwn_adms=intck('day30', PRV_DC_DT, ADM_DT);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2020 14:38:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Most-accurate-way-to-count-months-between-two-date-variables/m-p/617763#M19127</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-01-16T14:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: Most accurate way to count months between two date variables?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Most-accurate-way-to-count-months-between-two-date-variables/m-p/617765#M19128</link>
      <description>&lt;P&gt;Ah ok! This is great. thanks so much. I'll check out both!&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2020 14:39:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Most-accurate-way-to-count-months-between-two-date-variables/m-p/617765#M19128</guid>
      <dc:creator>accintron</dc:creator>
      <dc:date>2020-01-16T14:39:58Z</dc:date>
    </item>
    <item>
      <title>Re: Most accurate way to count months between two date variables?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Most-accurate-way-to-count-months-between-two-date-variables/m-p/617768#M19129</link>
      <description>&lt;P&gt;IMHO, you would still need to test carefully with "C" and without "C"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;Months_btwn_adms&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;intck&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;'day30'&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt; PRV_DC_DT&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt; ADM_DT,"c"&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;It seems quite likely you would need a 'C' for your custom interval too&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2020 14:43:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Most-accurate-way-to-count-months-between-two-date-variables/m-p/617768#M19129</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-01-16T14:43:53Z</dc:date>
    </item>
    <item>
      <title>Re: Most accurate way to count months between two date variables?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Most-accurate-way-to-count-months-between-two-date-variables/m-p/617773#M19130</link>
      <description>&lt;P&gt;Ok, thank you for this advice. I will try out all three! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2020 14:54:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Most-accurate-way-to-count-months-between-two-date-variables/m-p/617773#M19130</guid>
      <dc:creator>accintron</dc:creator>
      <dc:date>2020-01-16T14:54:01Z</dc:date>
    </item>
  </channel>
</rss>

