<?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: Catch Excel autofill errors after importing data in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Catch-Excel-autofill-errors-after-importing-data/m-p/853168#M337231</link>
    <description>&lt;P&gt;Use the DIF function.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  set have;
  days=dif(date_shipped);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 10 Jan 2023 21:18:50 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2023-01-10T21:18:50Z</dc:date>
    <item>
      <title>Catch Excel autofill errors after importing data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Catch-Excel-autofill-errors-after-importing-data/m-p/853157#M337230</link>
      <description>&lt;P&gt;I've a dataset that has wrong dates created off of a excel drag function. How can I compare and identify the dates that are exactly one day apart in the sequence to alert the team?&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;
&lt;TABLE width="159"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="64"&gt;ProductID&lt;/TD&gt;
&lt;TD width="95"&gt;Date_shipped&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;P3456&lt;/TD&gt;
&lt;TD&gt;10/2/2023&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;R2342&lt;/TD&gt;
&lt;TD&gt;10/3/2023&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;H9875&lt;/TD&gt;
&lt;TD&gt;10/4/2023&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;L5543&lt;/TD&gt;
&lt;TD&gt;10/5/2023&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Tue, 10 Jan 2023 20:38:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Catch-Excel-autofill-errors-after-importing-data/m-p/853157#M337230</guid>
      <dc:creator>Stalk</dc:creator>
      <dc:date>2023-01-10T20:38:48Z</dc:date>
    </item>
    <item>
      <title>Re: Catch Excel autofill errors after importing data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Catch-Excel-autofill-errors-after-importing-data/m-p/853168#M337231</link>
      <description>&lt;P&gt;Use the DIF function.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  set have;
  days=dif(date_shipped);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Jan 2023 21:18:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Catch-Excel-autofill-errors-after-importing-data/m-p/853168#M337231</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-01-10T21:18:50Z</dc:date>
    </item>
    <item>
      <title>Re: Catch Excel autofill errors after importing data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Catch-Excel-autofill-errors-after-importing-data/m-p/853170#M337232</link>
      <description>&lt;P&gt;Do you have other identification information such as a purchase order/bill of lading/ what have you? It would likely be a good idea to only report these one day increments in the case of&amp;nbsp; some group identified as such.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jan 2023 21:32:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Catch-Excel-autofill-errors-after-importing-data/m-p/853170#M337232</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-01-10T21:32:30Z</dc:date>
    </item>
    <item>
      <title>Re: Catch Excel autofill errors after importing data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Catch-Excel-autofill-errors-after-importing-data/m-p/853175#M337236</link>
      <description>&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;DIF function works, but is there any similar function to DIF to use in Proc SQL?&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;ERROR: The DIF function is not supported in PROC SQL, it is only valid within the DATA step.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;I have all my filters in SQL. Just for handling DIF function I have to recreate the whole dataset and order it again.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2023 00:18:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Catch-Excel-autofill-errors-after-importing-data/m-p/853175#M337236</guid>
      <dc:creator>Stalk</dc:creator>
      <dc:date>2023-01-11T00:18:02Z</dc:date>
    </item>
    <item>
      <title>Re: Catch Excel autofill errors after importing data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Catch-Excel-autofill-errors-after-importing-data/m-p/853176#M337237</link>
      <description>SAS programming is becoming simpler and easy to handle. Way to Go!!!!!!!&lt;BR /&gt;Thank you so much for the quick and best solution</description>
      <pubDate>Wed, 11 Jan 2023 00:28:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Catch-Excel-autofill-errors-after-importing-data/m-p/853176#M337237</guid>
      <dc:creator>Stalk</dc:creator>
      <dc:date>2023-01-11T00:28:26Z</dc:date>
    </item>
    <item>
      <title>Re: Catch Excel autofill errors after importing data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Catch-Excel-autofill-errors-after-importing-data/m-p/853177#M337238</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/358432"&gt;@Stalk&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;DIF function works, but is there any similar function to DIF to use in Proc SQL?&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;ERROR: The DIF function is not supported in PROC SQL, it is only valid within the DATA step.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;I have all my filters in SQL. Just for handling DIF function I have to recreate the whole dataset and order it again.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;SQL by its very nature knows nothing about the ORDER of observations so it is a terrible choice to do something like this.&lt;/P&gt;
&lt;P&gt;Your second statement makes no sense at all.&amp;nbsp; How are going to create a new VARIABLE without creating a new dataset, whether you use SQL query or a data step?&lt;/P&gt;
&lt;P&gt;Note that you can create views using either PROC SQL code or data step code you want to avoid making multiple physical copies of the data.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2023 00:41:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Catch-Excel-autofill-errors-after-importing-data/m-p/853177#M337238</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-01-11T00:41:09Z</dc:date>
    </item>
  </channel>
</rss>

