<?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 when using EXCEPT comparison in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Dates-when-using-EXCEPT-comparison/m-p/246975#M17521</link>
    <description>How can I solve the problem? I do not need times, just month, day and year to compare.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Carmen Goss&lt;BR /&gt;Integrated Data Systems&lt;BR /&gt;Winston-Salem/Forsyth County Schools&lt;BR /&gt;Ph: (336) 748-4000 ext 34595&lt;BR /&gt;&lt;BR /&gt;cdgoss@wsfcs.k12.nc.us&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;All e-mail correspondence to and from this address is subject to the North Carolina Public Records Law, which may result in monitoring and disclosure to third parties, including law enforcement. AN EQUAL OPPORTUNITY/AFFIRMATIVE ACTION EMPLOYER</description>
    <pubDate>Thu, 28 Jan 2016 15:45:45 GMT</pubDate>
    <dc:creator>vandhan</dc:creator>
    <dc:date>2016-01-28T15:45:45Z</dc:date>
    <item>
      <title>Dates when using EXCEPT comparison</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Dates-when-using-EXCEPT-comparison/m-p/246967#M17519</link>
      <description>&lt;P&gt;I am comparing files using the EXCEPT logic.&amp;nbsp; It is returning all row rather than the differences.&amp;nbsp; By process of elimination, it appears to be the date.&amp;nbsp; The output in both files is displayed the same (MM/DD/YYYY).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Input from first file is derived from existing sas tables and formatted NLDATMDT10.&lt;/P&gt;
&lt;P&gt;Input from other is from .csv import and is formatted MMDDYY10.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sql;&lt;BR /&gt;CREATE TABLE Attendance_Compare AS&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; select * from WORK.ATTNYEST&lt;BR /&gt;except&lt;BR /&gt;&amp;nbsp;&amp;nbsp; select * from WORK.DAILYATTENDANCE;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Help!&amp;nbsp; I tried several date changes and am getting nowhere.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2016 20:01:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Dates-when-using-EXCEPT-comparison/m-p/246967#M17519</guid>
      <dc:creator>carmendee</dc:creator>
      <dc:date>2016-01-29T20:01:43Z</dc:date>
    </item>
    <item>
      <title>Re: Dates when using EXCEPT comparison</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Dates-when-using-EXCEPT-comparison/m-p/246975#M17521</link>
      <description>How can I solve the problem? I do not need times, just month, day and year to compare.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Carmen Goss&lt;BR /&gt;Integrated Data Systems&lt;BR /&gt;Winston-Salem/Forsyth County Schools&lt;BR /&gt;Ph: (336) 748-4000 ext 34595&lt;BR /&gt;&lt;BR /&gt;cdgoss@wsfcs.k12.nc.us&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;All e-mail correspondence to and from this address is subject to the North Carolina Public Records Law, which may result in monitoring and disclosure to third parties, including law enforcement. AN EQUAL OPPORTUNITY/AFFIRMATIVE ACTION EMPLOYER</description>
      <pubDate>Thu, 28 Jan 2016 15:45:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Dates-when-using-EXCEPT-comparison/m-p/246975#M17521</guid>
      <dc:creator>vandhan</dc:creator>
      <dc:date>2016-01-28T15:45:45Z</dc:date>
    </item>
    <item>
      <title>Re: Dates when using EXCEPT comparison</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Dates-when-using-EXCEPT-comparison/m-p/246972#M17520</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/44570"&gt;@carmendee﻿&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As a first guess, I would add the keyword CORRESPONDING:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;except corresponding&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit: Now I realize that NLDATMDT10. is a &lt;EM&gt;datetime&lt;/EM&gt; format (unlike MMDDYY10.)! So, the values must&amp;nbsp;be different, hence "EXCEPT" fails. So,&amp;nbsp;if the time part of the datetimes in the first file is always 00:00:00, you could convert the date values from the second file to datetime values by multiplying them by 86400. Otherwise, you could create a date variable in the first dataset by taking the date part of the existing datetime values (using the DATEPART function).&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2016 20:39:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Dates-when-using-EXCEPT-comparison/m-p/246972#M17520</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2016-01-29T20:39:55Z</dc:date>
    </item>
    <item>
      <title>Re: Dates when using EXCEPT comparison</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Dates-when-using-EXCEPT-comparison/m-p/246981#M17522</link>
      <description>&lt;P&gt;Here is an example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have1;
input id mydtm :datetime.;
format mydtm nldatmdt10.;
cards;
1 12AUG2015:11:30:00
2 25MAR2015:14:30:00
2 26MAR2015:08:30:00
;
data have2;
input id mydate :date.;
format mydate mmddyy10.;
cards;
1 12AUG2015
2 26MAR2015
;

proc sql;
create table diff as
select *, datepart(mydtm) as mydate format=mmddyy10. from have1
except corresponding
select * from have2;
quit;

proc print data=diff;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;id        mydate

 2    03/25/2015&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2016 21:01:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Dates-when-using-EXCEPT-comparison/m-p/246981#M17522</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2016-01-29T21:01:40Z</dc:date>
    </item>
  </channel>
</rss>

