<?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: dates in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/dates/m-p/685707#M208005</link>
    <description>&lt;P&gt;Hello,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/298381"&gt;@mt88&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Formatting is irrelevant to this problem. You state they are both numeric, but if they were both numeric, you would not be getting missing values. So one or both must be character (not numeric). You need to identify the problem by figuring out which one (or both) is character. There should also be warnings or errors in the log. If you show us the ENTIRE log for your data step (including code, NOTEs, WARNINGs and ERRORs) by copying the log as text and pasting it into the window that appears when you click on the &amp;lt;/&amp;gt; icon &lt;STRONG&gt;(DO NOT SKIP THIS STEP)&lt;/STRONG&gt;, we probably can help further.&lt;/P&gt;</description>
    <pubDate>Tue, 22 Sep 2020 14:18:49 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2020-09-22T14:18:49Z</dc:date>
    <item>
      <title>dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/dates/m-p/685694#M207998</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a dataset with two date variables (call them date 1 and date 2). I'd like to create a third variable that gives me the number of days between the two dates. Date 1 is formatted as MMDDYY10. Date 2 is not formatted and appears as the number of days since Jan 1 1960 (i.e. a 5 digit number in all cases). I tried creating a new variable (call it datedifference) in the data step (datedifference = date 1 - date 2). This returned a variable (datedifference) with all missing values (date 1 and date 2 have no missing values). Next I tried to first format Date 2 to MMDDYY10 and then repeated the prior step. This gave me the same result.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions would be much appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks, Matt&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2020 13:50:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/dates/m-p/685694#M207998</guid>
      <dc:creator>mt88</dc:creator>
      <dc:date>2020-09-22T13:50:00Z</dc:date>
    </item>
    <item>
      <title>Re: dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/dates/m-p/685698#M208000</link>
      <description>&lt;P&gt;What is the data type of Date1, character or numeric?&amp;nbsp; I suspect it is a character in which case you will need to convert it to a numeric date first.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;input(date1,&lt;SPAN&gt;MMDDYY10.) - date2&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Other than that, we would need more info.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2020 14:08:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/dates/m-p/685698#M208000</guid>
      <dc:creator>CurtisMackWSIPP</dc:creator>
      <dc:date>2020-09-22T14:08:26Z</dc:date>
    </item>
    <item>
      <title>Re: dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/dates/m-p/685702#M208003</link>
      <description>&lt;P&gt;Hello, they are both numeric. Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2020 14:12:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/dates/m-p/685702#M208003</guid>
      <dc:creator>mt88</dc:creator>
      <dc:date>2020-09-22T14:12:45Z</dc:date>
    </item>
    <item>
      <title>Re: dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/dates/m-p/685707#M208005</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/298381"&gt;@mt88&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Formatting is irrelevant to this problem. You state they are both numeric, but if they were both numeric, you would not be getting missing values. So one or both must be character (not numeric). You need to identify the problem by figuring out which one (or both) is character. There should also be warnings or errors in the log. If you show us the ENTIRE log for your data step (including code, NOTEs, WARNINGs and ERRORs) by copying the log as text and pasting it into the window that appears when you click on the &amp;lt;/&amp;gt; icon &lt;STRONG&gt;(DO NOT SKIP THIS STEP)&lt;/STRONG&gt;, we probably can help further.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2020 14:18:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/dates/m-p/685707#M208005</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-09-22T14:18:49Z</dc:date>
    </item>
    <item>
      <title>Re: dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/dates/m-p/685750#M208026</link>
      <description>&lt;P&gt;Thanks all. I managed to figure it out.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2020 16:20:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/dates/m-p/685750#M208026</guid>
      <dc:creator>mt88</dc:creator>
      <dc:date>2020-09-22T16:20:53Z</dc:date>
    </item>
    <item>
      <title>Re: dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/dates/m-p/685764#M208030</link>
      <description>&lt;P&gt;Please share the solution with the rest of the SAS Community!&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2020 16:59:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/dates/m-p/685764#M208030</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-09-22T16:59:47Z</dc:date>
    </item>
  </channel>
</rss>

