<?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: Base SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Base-SAS/m-p/229173#M41446</link>
    <description>&lt;P&gt;If you execute the code shown in the original post, the number &lt;SPAN&gt;9.1917808219&lt;/SPAN&gt; comes from the lines of code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;a=today()-'01AUG2006'd;
b=a/365;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;It's not clear to me what the user wants to do with this number, which (s)he misinterprets as 9 years 191 days&lt;/P&gt;</description>
    <pubDate>Thu, 08 Oct 2015 18:53:57 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2015-10-08T18:53:57Z</dc:date>
    <item>
      <title>Base SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Base-SAS/m-p/229099#M41421</link>
      <description>&lt;P&gt;I would like to have the result of the following codes in year and days format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;years=9.1917808219 I want to see this as 9 year 191 days.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data dt;&lt;BR /&gt;a=today()-'01AUG2006'd;&lt;BR /&gt;b=a/365;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help me.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2015 11:33:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Base-SAS/m-p/229099#M41421</guid>
      <dc:creator>KafeelBasha</dc:creator>
      <dc:date>2015-10-08T11:33:28Z</dc:date>
    </item>
    <item>
      <title>Re: Base SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Base-SAS/m-p/229102#M41422</link>
      <description>&lt;P&gt;I'm confused because &lt;SPAN&gt;9.1917808219&lt;/SPAN&gt; is not 9 years 191 days.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is 9 years and .1917808219 years (which is 70 days)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So please be more specific about what output you want.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2015 11:55:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Base-SAS/m-p/229102#M41422</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2015-10-08T11:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: Base SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Base-SAS/m-p/229104#M41423</link>
      <description>&lt;P&gt;I understand PaigeMiller here, its not clear what you want. &amp;nbsp;From your given example you can reverse the formula you have given:&lt;/P&gt;
&lt;PRE&gt;data dt;
  a=today()-'01AUG2006'd;
  b=a/365;
  c=b*365;
  d=c+"01AUG2006"d;
  format d date9.;
run;&lt;/PRE&gt;
&lt;P&gt;So b contains your 9.191... I fyou then multiply that by 365 and add the original base date back on you should arrive at today. &amp;nbsp;However note that doing this whole a year is 365 days, rather than using proper interval functions is risky and might yield incorrect results. &amp;nbsp;Why do you need to do this, have they not supplied the original dates used in the calculation as they should have.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2015 12:23:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Base-SAS/m-p/229104#M41423</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-10-08T12:23:16Z</dc:date>
    </item>
    <item>
      <title>Re: Base SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Base-SAS/m-p/229167#M41443</link>
      <description>&lt;P&gt;That number (&lt;SPAN&gt;9.1917808219 I) must come from outside SAS as time intervals are not measured in years within SAS. Knowing where that time interval comes from would help finding a precise SAS equivalent.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2015 18:04:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Base-SAS/m-p/229167#M41443</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2015-10-08T18:04:18Z</dc:date>
    </item>
    <item>
      <title>Re: Base SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Base-SAS/m-p/229173#M41446</link>
      <description>&lt;P&gt;If you execute the code shown in the original post, the number &lt;SPAN&gt;9.1917808219&lt;/SPAN&gt; comes from the lines of code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;a=today()-'01AUG2006'd;
b=a/365;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;It's not clear to me what the user wants to do with this number, which (s)he misinterprets as 9 years 191 days&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2015 18:53:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Base-SAS/m-p/229173#M41446</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2015-10-08T18:53:57Z</dc:date>
    </item>
    <item>
      <title>Re: Base SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Base-SAS/m-p/229182#M41448</link>
      <description>&lt;P&gt;Oh! I finally get it. You'll get exact numbers with SAS interval functions:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data dt;
years = intck("YEAR", '01AUG2006'd, today(), 'CONTINUOUS');
days = intck("DAY", intnx("YEAR", '01AUG2006'd, years, 'SAME'), today());
put (_ALL_) (=);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 08 Oct 2015 19:29:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Base-SAS/m-p/229182#M41448</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2015-10-08T19:29:47Z</dc:date>
    </item>
  </channel>
</rss>

