<?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 between tow dates in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Calculate-Days-between-tow-dates/m-p/419651#M103200</link>
    <description>&lt;P&gt;In SAS what you show is a DATETIME, not a DATE. This is a critical difference as dates use numbers of days as the interval and datetimes are numbers of seconds. Due to a number of issues the range of date values that work with the various functions are limited to dates before the year 20,000. Most datetimes, when treated as dates without conversion, vastly exceed that range.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hence the options of the DTDay, DTMONTH and DTYear functions to address the increments of datetimes instead of dates so the proper conversion is used.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;OR explicitly use the DATEPART of a datetime value.&lt;/P&gt;</description>
    <pubDate>Fri, 08 Dec 2017 18:00:48 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2017-12-08T18:00:48Z</dc:date>
    <item>
      <title>Calculate Days between tow dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculate-Days-between-tow-dates/m-p/419643#M103198</link>
      <description>&lt;P&gt;Two date as:&lt;/P&gt;&lt;P&gt;CLCL_PAID_DT=22NOV2017:00:00:00.000&lt;/P&gt;&lt;P&gt;CLCL_RECD_DT =12NOV2017:00:00:00.000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code:&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;INTCK(&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'DAY'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,t1.CLCL_PAID_DT,t1.CLCL_RECD_DT,&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'C'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;AS&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Age1,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;DATDIF(t1.CLCL_PAID_DT,t1.CLCL_RECD_DT,&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'act/act'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;AS&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Age&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;but both without value. Why &lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Dec 2017 17:47:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculate-Days-between-tow-dates/m-p/419643#M103198</guid>
      <dc:creator>JHE</dc:creator>
      <dc:date>2017-12-08T17:47:59Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Days between tow dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculate-Days-between-tow-dates/m-p/419648#M103199</link>
      <description>&lt;P&gt;I think the interval is DTDAY or DAYDT when dealing with date times?&lt;/P&gt;</description>
      <pubDate>Fri, 08 Dec 2017 17:51:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculate-Days-between-tow-dates/m-p/419648#M103199</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-12-08T17:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Days between tow dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculate-Days-between-tow-dates/m-p/419651#M103200</link>
      <description>&lt;P&gt;In SAS what you show is a DATETIME, not a DATE. This is a critical difference as dates use numbers of days as the interval and datetimes are numbers of seconds. Due to a number of issues the range of date values that work with the various functions are limited to dates before the year 20,000. Most datetimes, when treated as dates without conversion, vastly exceed that range.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hence the options of the DTDay, DTMONTH and DTYear functions to address the increments of datetimes instead of dates so the proper conversion is used.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;OR explicitly use the DATEPART of a datetime value.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Dec 2017 18:00:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculate-Days-between-tow-dates/m-p/419651#M103200</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-12-08T18:00:48Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Days between tow dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculate-Days-between-tow-dates/m-p/419658#M103202</link>
      <description>&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;INTCK(&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'DTDAY'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,CLCL_RECD_DT,CLCL_PAID_DT)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;works.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Dec 2017 18:29:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculate-Days-between-tow-dates/m-p/419658#M103202</guid>
      <dc:creator>JHE</dc:creator>
      <dc:date>2017-12-08T18:29:50Z</dc:date>
    </item>
  </channel>
</rss>

