<?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 Doing a CALC on two date fields and using DATEPART in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Doing-a-CALC-on-two-date-fields-and-using-DATEPART/m-p/313595#M68174</link>
    <description>&lt;P&gt;I am getting (.) in my results, now I know this has something to do with the date and creating a numeric value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I get rid of the (.)?&amp;nbsp; I am using the SAS Plug in for excel and this is giving me fits when I go to use a Pivot.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would rather if there is no value to just leave it blank.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here is the partial code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;AVG(DATEPART(S.On_Block_Dt) - DATEPART(S.Title_Rcvd_Dt)) &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; Title_Received_to_On_Block, &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;AVG(DATEPART(S.Sale_Date) - DATEPART(S.Title_Rcvd_Dt)) &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;AS&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; Title_Received_to_Sold, &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;AVG(DATEPART(S.Title_Rcvd_Dt) - DATEPART(S.Secured_Dt)) &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;AS&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; Secured_to_Title_Received, &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;AVG(DATEPART(S.Assigned_Dt) - DATEPART(S.Grounding_Dt)) &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;AS&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; Grounded_to_Assigned, &lt;/FONT&gt;&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;I am using PROC SQL to do this.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 22 Nov 2016 21:01:17 GMT</pubDate>
    <dc:creator>TMiller16</dc:creator>
    <dc:date>2016-11-22T21:01:17Z</dc:date>
    <item>
      <title>Doing a CALC on two date fields and using DATEPART</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Doing-a-CALC-on-two-date-fields-and-using-DATEPART/m-p/313595#M68174</link>
      <description>&lt;P&gt;I am getting (.) in my results, now I know this has something to do with the date and creating a numeric value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I get rid of the (.)?&amp;nbsp; I am using the SAS Plug in for excel and this is giving me fits when I go to use a Pivot.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would rather if there is no value to just leave it blank.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here is the partial code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;AVG(DATEPART(S.On_Block_Dt) - DATEPART(S.Title_Rcvd_Dt)) &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; Title_Received_to_On_Block, &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;AVG(DATEPART(S.Sale_Date) - DATEPART(S.Title_Rcvd_Dt)) &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;AS&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; Title_Received_to_Sold, &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;AVG(DATEPART(S.Title_Rcvd_Dt) - DATEPART(S.Secured_Dt)) &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;AS&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; Secured_to_Title_Received, &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;AVG(DATEPART(S.Assigned_Dt) - DATEPART(S.Grounding_Dt)) &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;AS&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; Grounded_to_Assigned, &lt;/FONT&gt;&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;I am using PROC SQL to do this.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2016 21:01:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Doing-a-CALC-on-two-date-fields-and-using-DATEPART/m-p/313595#M68174</guid>
      <dc:creator>TMiller16</dc:creator>
      <dc:date>2016-11-22T21:01:17Z</dc:date>
    </item>
    <item>
      <title>Re: Doing a CALC on two date fields and using DATEPART</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Doing-a-CALC-on-two-date-fields-and-using-DATEPART/m-p/313597#M68175</link>
      <description>&lt;P&gt;Missing is a period for numerics, not a blank. Even if you add in conditional logic to not calculate the value, it would still be missing and a period.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since you're doing an average or summarization I'm suprised you're ending up with missing, unless what happens is, if you have any value missing it's being set to missing. Or you're missing a lot of data.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2016 21:05:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Doing-a-CALC-on-two-date-fields-and-using-DATEPART/m-p/313597#M68175</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-11-22T21:05:17Z</dc:date>
    </item>
    <item>
      <title>Re: Doing a CALC on two date fields and using DATEPART</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Doing-a-CALC-on-two-date-fields-and-using-DATEPART/m-p/313616#M68179</link>
      <description>&lt;P&gt;Try using &lt;STRONG&gt;option missing=' ';&lt;/STRONG&gt; before&amp;nbsp;writing to Excel.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2016 22:53:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Doing-a-CALC-on-two-date-fields-and-using-DATEPART/m-p/313616#M68179</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-11-22T22:53:18Z</dc:date>
    </item>
  </channel>
</rss>

