<?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 Distance between days in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Distance-between-days/m-p/261525#M18216</link>
    <description>&lt;P&gt;How can I calculate the days between a given date and dates imported to SAS EG via a csv file - dates in the Date9 format. Is it possible to do this via the query builder?&lt;/P&gt;</description>
    <pubDate>Tue, 05 Apr 2016 21:02:45 GMT</pubDate>
    <dc:creator>dlansdowne0090</dc:creator>
    <dc:date>2016-04-05T21:02:45Z</dc:date>
    <item>
      <title>Distance between days</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Distance-between-days/m-p/261525#M18216</link>
      <description>&lt;P&gt;How can I calculate the days between a given date and dates imported to SAS EG via a csv file - dates in the Date9 format. Is it possible to do this via the query builder?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2016 21:02:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Distance-between-days/m-p/261525#M18216</guid>
      <dc:creator>dlansdowne0090</dc:creator>
      <dc:date>2016-04-05T21:02:45Z</dc:date>
    </item>
    <item>
      <title>Re: Distance between days</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Distance-between-days/m-p/261532#M18217</link>
      <description>&lt;P&gt;Yes, do a compute field and subtract the dates.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can specify your date as '01Jan2016'd&lt;/P&gt;
&lt;P&gt;It HAS to be specified in this manner.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This assumes that when you imported the data you created a SAS date variable, it has a numeric type and a date format.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2016 21:16:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Distance-between-days/m-p/261532#M18217</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-04-05T21:16:50Z</dc:date>
    </item>
    <item>
      <title>Re: Distance between days</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Distance-between-days/m-p/261558#M18219</link>
      <description>&lt;P&gt;As above you need to do a compute field&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can use the INTCK Function get the difference between days - i.e&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;INTCK('Day','01APR2016"D,"06APR2016"D)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result&amp;nbsp;in this example is 5&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2016 23:21:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Distance-between-days/m-p/261558#M18219</guid>
      <dc:creator>Chokin</dc:creator>
      <dc:date>2016-04-05T23:21:38Z</dc:date>
    </item>
    <item>
      <title>Re: Distance between days</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Distance-between-days/m-p/261559#M18220</link>
      <description>&lt;P&gt;And you can definitely use intck in the query builder. I don't know why, I just feel more "professional" using it to calculate number of days between two dates. Makes no sense, I know!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tom&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2016 23:53:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Distance-between-days/m-p/261559#M18220</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2016-04-05T23:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: Distance between days</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Distance-between-days/m-p/261606#M18221</link>
      <description>&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15142"&gt;@TomKari&lt;/a&gt; it definitely looks more advanced &lt;span class="lia-unicode-emoji" title=":grinning_squinting_face:"&gt;😆&lt;/span&gt;</description>
      <pubDate>Wed, 06 Apr 2016 06:28:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Distance-between-days/m-p/261606#M18221</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-04-06T06:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: Distance between days</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Distance-between-days/m-p/261618#M18222</link>
      <description>&lt;P&gt;Usage of INTCK will be robust if SAS (ever) changes the internal format of date values.&lt;/P&gt;
&lt;P&gt;It is also easier to adjust if datetime values need to be compared, as only 'DAY' needs to be changed to 'DTDAY'.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2016 07:39:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Distance-between-days/m-p/261618#M18222</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-04-06T07:39:12Z</dc:date>
    </item>
    <item>
      <title>Re: Distance between days</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Distance-between-days/m-p/261645#M18224</link>
      <description>&lt;P&gt;Thank you Kurt! I now have a reasonable explanation for my OCD-like behaviour!!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tom&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2016 10:34:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Distance-between-days/m-p/261645#M18224</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2016-04-06T10:34:23Z</dc:date>
    </item>
    <item>
      <title>Re: Distance between days</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Distance-between-days/m-p/263855#M18322</link>
      <description>&lt;P&gt;In addition to the &lt;A href="http://support.sas.com/documentation/cdl/en/lefunctionsref/67960/HTML/default/viewer.htm#p1md4mx2crzfaqn14va8kt7qvfhr.htm" target="_self"&gt;INTCK function&lt;/A&gt; -- super robust and flexible, as&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15142"&gt;@TomKari﻿&lt;/a&gt;&amp;nbsp;and others point out, there is a simpler (conceptually) &lt;A href="http://support.sas.com/documentation/cdl/en/lefunctionsref/63354/HTML/default/viewer.htm#p1gz65986b9jqin19zk9xqbi7ns3.htm" target="_self"&gt;DATDIF function&lt;/A&gt;. &amp;nbsp;You can add as a Computed Column, Advanced Expression in the Query Builder. &amp;nbsp;Example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lefunctionsref/63354/HTML/default/viewer.htm#p1gz65986b9jqin19zk9xqbi7ns3.htm" target="_self"&gt;DATDIF&lt;/A&gt;(t1.Shipped,t1.Returned,'act/act')&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/2782i7011B631F76C88AD/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="datdif.png" title="datdif.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2016 13:04:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Distance-between-days/m-p/263855#M18322</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2016-04-14T13:04:48Z</dc:date>
    </item>
    <item>
      <title>Re: Distance between days</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Distance-between-days/m-p/263884#M18326</link>
      <description>&lt;P&gt;Well, as I always tell people, there's at least twelve ways to do everything in SAS!&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2016 14:17:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Distance-between-days/m-p/263884#M18326</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2016-04-14T14:17:38Z</dc:date>
    </item>
  </channel>
</rss>

