<?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: intnx function with fraction of seconds. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/intnx-function-with-fraction-of-seconds/m-p/634922#M188476</link>
    <description>&lt;P&gt;The E and B modifiers would end up with an integer number of seconds and since you are applying them to the same base second with zero intervals applied you get the same result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you need something else such as the 0.99999 ending then increment the second to the beginning of the next and subtract a small amount such as&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;second_e   = intnx('second',_datetime,1,'B') -.00001;
&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 25 Mar 2020 22:53:44 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2020-03-25T22:53:44Z</dc:date>
    <item>
      <title>intnx function with fraction of seconds.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/intnx-function-with-fraction-of-seconds/m-p/634920#M188475</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I was playing around with the intnx function...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
    _datetime='25MAR2020:23:31:45.052348'dt;

    second_b   = intnx('second',_datetime,0,'b'); 
    second_e   = intnx('second',_datetime,0,'e'); 

    put _datetime e8601dt26.6;
    
    put second_b   e8601dt26.6;
    put second_e   e8601dt26.6;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got the following output&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; 2020-03-25T23:31:45.052348
 2020-03-25T23:31:45.000000
 2020-03-25T23:31:45.000000&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But I was expecting something different for the end of the second, like .999999 instead of .000000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; 2020-03-25T23:31:45.052348
 2020-03-25T23:31:45.000000
 2020-03-25T23:31:45.999999&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Did I miss something here?&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Véronique&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Mar 2020 22:39:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/intnx-function-with-fraction-of-seconds/m-p/634920#M188475</guid>
      <dc:creator>xxformat_com</dc:creator>
      <dc:date>2020-03-25T22:39:01Z</dc:date>
    </item>
    <item>
      <title>Re: intnx function with fraction of seconds.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/intnx-function-with-fraction-of-seconds/m-p/634922#M188476</link>
      <description>&lt;P&gt;The E and B modifiers would end up with an integer number of seconds and since you are applying them to the same base second with zero intervals applied you get the same result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you need something else such as the 0.99999 ending then increment the second to the beginning of the next and subtract a small amount such as&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;second_e   = intnx('second',_datetime,1,'B') -.00001;
&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 25 Mar 2020 22:53:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/intnx-function-with-fraction-of-seconds/m-p/634922#M188476</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-03-25T22:53:44Z</dc:date>
    </item>
  </channel>
</rss>

