<?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: PROC Compare - Maybe?! in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-Compare-Maybe/m-p/391712#M94149</link>
    <description>I don't see an assigned format for the specimen collection date variable. It only lists the format of "common variables with differing attributes" under variable summary</description>
    <pubDate>Wed, 30 Aug 2017 02:37:02 GMT</pubDate>
    <dc:creator>Jepi</dc:creator>
    <dc:date>2017-08-30T02:37:02Z</dc:date>
    <item>
      <title>PROC Compare - Maybe?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Compare-Maybe/m-p/391707#M94145</link>
      <description>I need to compare 2 datasets (should be equal). They have same variables but I want to see matching and missing observations. I have attempted PROC Compare. I'm having a problem with the "value comparison results for variables" output listing a value in both datasets and calculating a percent difference.&lt;BR /&gt;Ex: obs Base Compare Diff. %Diff&lt;BR /&gt;17 17Sep2014 17Sep2014. 0.6250 0.003128</description>
      <pubDate>Wed, 30 Aug 2017 01:24:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Compare-Maybe/m-p/391707#M94145</guid>
      <dc:creator>Jepi</dc:creator>
      <dc:date>2017-08-30T01:24:08Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Compare - Maybe?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Compare-Maybe/m-p/391708#M94146</link>
      <description>&lt;P&gt;One explanation for what you are seeing is that the variable you are comparing is in fact a DATETIME but you are only seeing the DATE part of it. What SAS format is assigned to this variable?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2017 01:37:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Compare-Maybe/m-p/391708#M94146</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2017-08-30T01:37:17Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Compare - Maybe?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Compare-Maybe/m-p/391712#M94149</link>
      <description>I don't see an assigned format for the specimen collection date variable. It only lists the format of "common variables with differing attributes" under variable summary</description>
      <pubDate>Wed, 30 Aug 2017 02:37:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Compare-Maybe/m-p/391712#M94149</guid>
      <dc:creator>Jepi</dc:creator>
      <dc:date>2017-08-30T02:37:02Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Compare - Maybe?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Compare-Maybe/m-p/391746#M94164</link>
      <description>&lt;P&gt;Use PROC CONTENTS to check for assigned formats. PROC COMPARE is indicating there is an assigned format by displaying data in the form DDMONYYYY:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc contents data = DatasetName;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Aug 2017 07:12:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Compare-Maybe/m-p/391746#M94164</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2017-08-30T07:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Compare - Maybe?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Compare-Maybe/m-p/391825#M94190</link>
      <description>Dataset Type Len Format Informat&lt;BR /&gt;Base Num 8 Date9. Date9.&lt;BR /&gt;Compare Num 8 Date9. Date9.</description>
      <pubDate>Wed, 30 Aug 2017 13:36:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Compare-Maybe/m-p/391825#M94190</guid>
      <dc:creator>Jepi</dc:creator>
      <dc:date>2017-08-30T13:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Compare - Maybe?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Compare-Maybe/m-p/391902#M94215</link>
      <description>&lt;P&gt;Please show the code you are attempting. Compare has a number of options on what to compare and how to display the results.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also if you are interested in comparisons of observations you may need to sort the data sets by a number of variables to get them into the same order.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2017 15:32:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Compare-Maybe/m-p/391902#M94215</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-08-30T15:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Compare - Maybe?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Compare-Maybe/m-p/391918#M94217</link>
      <description>PROC COMPARE BASE = Dataset COMPARE = Dataset;&lt;BR /&gt;&lt;BR /&gt;I created the base dataset manually to match that of compare. More than one facility reports to the base and therefore had more data than needed. As opposed to the compare dataset which is data from one facility.&lt;BR /&gt;&lt;BR /&gt;I'm looking to compare them for accuracy</description>
      <pubDate>Wed, 30 Aug 2017 15:55:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Compare-Maybe/m-p/391918#M94217</guid>
      <dc:creator>Jepi</dc:creator>
      <dc:date>2017-08-30T15:55:50Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Compare - Maybe?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Compare-Maybe/m-p/391926#M94219</link>
      <description>&lt;P&gt;You probably converted one of the files from Excel. &amp;nbsp;In Excel datetime values are stored using the interger part for the date and the fraction as the percent of 24 hours. &amp;nbsp;In SAS the DATE format will ignore the fractional part of the value and just display the date.&lt;/P&gt;
&lt;PRE&gt;404   data _null_;
405    dt1='17Sep2014'd ;
406    dt2=dt1 + 0.6250;
407    put (dt1 dt2) (=) / (dt1 dt2) (date9. +1) ;
408   run;

dt1=19983 dt2=19983.625
17SEP2014 17SEP2014
&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Aug 2017 16:17:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Compare-Maybe/m-p/391926#M94219</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-08-30T16:17:34Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Compare - Maybe?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Compare-Maybe/m-p/391928#M94220</link>
      <description>Both files are imported Excel files. I should do this with all (3) of date variables?</description>
      <pubDate>Wed, 30 Aug 2017 16:24:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Compare-Maybe/m-p/391928#M94220</guid>
      <dc:creator>Jepi</dc:creator>
      <dc:date>2017-08-30T16:24:39Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Compare - Maybe?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Compare-Maybe/m-p/391930#M94221</link>
      <description>&lt;P&gt;You will need to decide what to do based on what you need.&lt;/P&gt;
&lt;P&gt;If you are just looking to see if the values have the date part and the very few that don't are just because of these fractional parts then you could perhaps just declare success and move on.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you did want to convert you would use a data step to make a new version of the data with the date values converted. &amp;nbsp;If you have more than one date variable per dataset then you can use ARRAY processing to simplify the code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example to just remove the fractional date part using the INT() or ROUND(,1) function.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;mydate = int(mydate);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you wanted to convert the variable to DATETIME instead to preserve the time part then you could use the DHMS() format. It will automatically conver the fractional part for you.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;mydate = dhms(mydate,0,0,0);
format mydate datetime20.;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2017 16:40:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Compare-Maybe/m-p/391930#M94221</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-08-30T16:40:19Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Compare - Maybe?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Compare-Maybe/m-p/391965#M94229</link>
      <description>I don't understand why it's reading date and time. I know fate is the integer portion and time fractional? Both excel sheets are in the same date format XX/XX/XXXX</description>
      <pubDate>Wed, 30 Aug 2017 18:01:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Compare-Maybe/m-p/391965#M94229</guid>
      <dc:creator>Jepi</dc:creator>
      <dc:date>2017-08-30T18:01:02Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Compare - Maybe?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Compare-Maybe/m-p/391966#M94230</link>
      <description>I used the import wizard</description>
      <pubDate>Wed, 30 Aug 2017 18:01:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Compare-Maybe/m-p/391966#M94230</guid>
      <dc:creator>Jepi</dc:creator>
      <dc:date>2017-08-30T18:01:58Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Compare - Maybe?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Compare-Maybe/m-p/391967#M94231</link>
      <description>&lt;P&gt;The import wizard noticed that most of the cells in that column have a date format attached, so it decided to import the value as a date. Since Excel stores dates as number and so does SAS it just copied over the number and adjusted the value to match the difference in base dates that the two systems use. &amp;nbsp;If the value had a fractional date then that was copied along with it. &amp;nbsp;In both SAS and Excel if you format the value with a format that ignores the fractional value then you do not normally see the fraction value, but it is still there in the data.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2017 18:05:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Compare-Maybe/m-p/391967#M94231</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-08-30T18:05:27Z</dc:date>
    </item>
  </channel>
</rss>

