<?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: Days So Far in the Month Including Hours in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Days-So-Far-in-the-Month-Including-Hours/m-p/545811#M151065</link>
    <description>&lt;P&gt;thanks!&lt;/P&gt;</description>
    <pubDate>Mon, 25 Mar 2019 13:49:40 GMT</pubDate>
    <dc:creator>BCNAV</dc:creator>
    <dc:date>2019-03-25T13:49:40Z</dc:date>
    <item>
      <title>Days So Far in the Month Including Hours</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Days-So-Far-in-the-Month-Including-Hours/m-p/545794#M151059</link>
      <description>&lt;P&gt;Any idea on how to create a variable that will give the number of days so far in the month...including hours?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, at 9pm tonight (March 25 ,2019), the variable dayssofar would be 24 days + 21hrs/24hrs = 24 + 0.875 = 24.875 days.&lt;/P&gt;&lt;P&gt;Therefore&amp;nbsp;dayssofar would equal 24.875&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>Mon, 25 Mar 2019 13:19:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Days-So-Far-in-the-Month-Including-Hours/m-p/545794#M151059</guid>
      <dc:creator>BCNAV</dc:creator>
      <dc:date>2019-03-25T13:19:52Z</dc:date>
    </item>
    <item>
      <title>Re: Days So Far in the Month Including Hours</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Days-So-Far-in-the-Month-Including-Hours/m-p/545799#M151061</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
days_of_month = (datetime() - intnx('dtmonth',datetime(),0,'b')) / 86400;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 25 Mar 2019 13:27:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Days-So-Far-in-the-Month-Including-Hours/m-p/545799#M151061</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-03-25T13:27:24Z</dc:date>
    </item>
    <item>
      <title>Re: Days So Far in the Month Including Hours</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Days-So-Far-in-the-Month-Including-Hours/m-p/545800#M151062</link>
      <description>&lt;P&gt;You can use the datetime() function to get the current date and time, then subtract off the date/time of the beginning of the month to give you the answer in seconds. Then convert to days by dividing by 86400.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
    current_datetime=datetime();
    seconds_from_month_start=current_datetime - intnx('dtmonth',current_datetime,0,'b');
    days_from_month_start = seconds_from_month_start / 86400;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2019 13:37:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Days-So-Far-in-the-Month-Including-Hours/m-p/545800#M151062</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-03-25T13:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: Days So Far in the Month Including Hours</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Days-So-Far-in-the-Month-Including-Hours/m-p/545811#M151065</link>
      <description>&lt;P&gt;thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2019 13:49:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Days-So-Far-in-the-Month-Including-Hours/m-p/545811#M151065</guid>
      <dc:creator>BCNAV</dc:creator>
      <dc:date>2019-03-25T13:49:40Z</dc:date>
    </item>
  </channel>
</rss>

