<?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: calculate days in month in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/calculate-days-in-month/m-p/575062#M162591</link>
    <description>&lt;P&gt;How do you calculate days to months in SAS? I actually have days like 1575757. I need to convert this. Help.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 19 Jul 2019 21:39:15 GMT</pubDate>
    <dc:creator>Cerium23</dc:creator>
    <dc:date>2019-07-19T21:39:15Z</dc:date>
    <item>
      <title>calculate days in month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calculate-days-in-month/m-p/340463#M77808</link>
      <description>&lt;P&gt;hey &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;pleas help me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have to calculate an observation time between two dates and sas calculates the days of the periode. How can I get sas to calculate it in months?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you for your help&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2017 15:51:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calculate-days-in-month/m-p/340463#M77808</guid>
      <dc:creator>kathisas</dc:creator>
      <dc:date>2017-03-13T15:51:53Z</dc:date>
    </item>
    <item>
      <title>Re: calculate days in month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calculate-days-in-month/m-p/340473#M77811</link>
      <description>&lt;P&gt;Assuming you have sas numeric dates then you can use:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;period = intck('month',date2,date1);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your data containd datetime variables you should use datepart() function&lt;/P&gt;
&lt;P&gt;to convert datetime into sas date.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2017 16:26:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calculate-days-in-month/m-p/340473#M77811</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-03-13T16:26:15Z</dc:date>
    </item>
    <item>
      <title>Re: calculate days in month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calculate-days-in-month/m-p/340482#M77816</link>
      <description>&lt;P&gt;A simple approach would transform the number of days into number of months:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;n_months = (date2 - date1) / 30.5;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you have different rules in mind for computing number of months?&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2017 16:40:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calculate-days-in-month/m-p/340482#M77816</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-03-13T16:40:59Z</dc:date>
    </item>
    <item>
      <title>Re: calculate days in month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calculate-days-in-month/m-p/424534#M104543</link>
      <description>&lt;P&gt;dur_month = dur_day/30.4375;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;365.25 days per year.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;365 days in normal year&lt;/P&gt;&lt;P&gt;366 days in Leap year&lt;/P&gt;&lt;P&gt;0.25 days * 4 year becomes extra day in Leap year&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so, 365.25/12 = 30.4375 days per month&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/133378"&gt;@kathisas&lt;/a&gt; wrote:&lt;BR /&gt;&lt;P&gt;hey &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;pleas help me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have to calculate an observation time between two dates and sas calculates the days of the periode. How can I get sas to calculate it in months?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you for your help&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2018 10:40:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calculate-days-in-month/m-p/424534#M104543</guid>
      <dc:creator>AravindanKarunakaran</dc:creator>
      <dc:date>2018-01-03T10:40:09Z</dc:date>
    </item>
    <item>
      <title>Re: calculate days in month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calculate-days-in-month/m-p/575062#M162591</link>
      <description>&lt;P&gt;How do you calculate days to months in SAS? I actually have days like 1575757. I need to convert this. Help.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2019 21:39:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calculate-days-in-month/m-p/575062#M162591</guid>
      <dc:creator>Cerium23</dc:creator>
      <dc:date>2019-07-19T21:39:15Z</dc:date>
    </item>
  </channel>
</rss>

