<?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 import / two date variables with the same format in an excel file imported differently in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-import-two-date-variables-with-the-same-format-in-an-excel/m-p/637110#M189387</link>
    <description>GUESSINGROWS=MAX; Fixed the problem. Yes. The date variable broke had missing for about 98% of the data. &lt;BR /&gt;Thank you very much Reeza. I greatly appreciate it.</description>
    <pubDate>Thu, 02 Apr 2020 23:27:17 GMT</pubDate>
    <dc:creator>Cruise</dc:creator>
    <dc:date>2020-04-02T23:27:17Z</dc:date>
    <item>
      <title>Proc import / two date variables with the same format in an excel file imported differently</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-import-two-date-variables-with-the-same-format-in-an-excel/m-p/637102#M189383</link>
      <description>&lt;P&gt;Hi Folks:&lt;/P&gt;
&lt;P&gt;I imported a data.csv using 'proc import'. The data had two date variables: 'confirmed_date' and 'deceased_date'. Before importing, both appeared to have a format 'Date' in the CSV as shown in the screenshot below. However, one of the dates 'deceased_date' was broke in the resulting SAS dataset&amp;nbsp; after imported.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What happened to cause that 'deceased_date' was broke but not 'confirmed_date' ?&lt;/P&gt;
&lt;P&gt;Any pointers that could be corrected in my 'proc import' code below?&lt;/P&gt;
&lt;P&gt;Thanks for your time in advance.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc import 
datafile="...\patientinfo.csv"
out=patientinfo
dbms=csv replace;
getnames=yes;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="import problem.png" style="width: 966px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/37722iBD14F349F103EECE/image-size/large?v=v2&amp;amp;px=999" role="button" title="import problem.png" alt="import problem.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Apr 2020 22:47:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-import-two-date-variables-with-the-same-format-in-an-excel/m-p/637102#M189383</guid>
      <dc:creator>Cruise</dc:creator>
      <dc:date>2020-04-02T22:47:40Z</dc:date>
    </item>
    <item>
      <title>Re: Proc import / two date variables with the same format in an excel file imported differently</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-import-two-date-variables-with-the-same-format-in-an-excel/m-p/637109#M189386</link>
      <description>&lt;P&gt;Check the log and see that field is set to be read as a character. My guess is somewhere in the first 1000 rows you have a lot of missing data so it assumed it was a character and imported it as such. Add GUESSINGROWS=MAX; , which will take a long time is one try to fix it. If that works, I would recommend you take the code from the log and use that for future imports - it's much faster than when SAS has to guess each type.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In general, it's bad practice to use PROC IMPORT to rely on for data imports, you should be building your data import of a specification list or data dictionary.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Apr 2020 23:20:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-import-two-date-variables-with-the-same-format-in-an-excel/m-p/637109#M189386</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-04-02T23:20:41Z</dc:date>
    </item>
    <item>
      <title>Re: Proc import / two date variables with the same format in an excel file imported differently</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-import-two-date-variables-with-the-same-format-in-an-excel/m-p/637110#M189387</link>
      <description>GUESSINGROWS=MAX; Fixed the problem. Yes. The date variable broke had missing for about 98% of the data. &lt;BR /&gt;Thank you very much Reeza. I greatly appreciate it.</description>
      <pubDate>Thu, 02 Apr 2020 23:27:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-import-two-date-variables-with-the-same-format-in-an-excel/m-p/637110#M189387</guid>
      <dc:creator>Cruise</dc:creator>
      <dc:date>2020-04-02T23:27:17Z</dc:date>
    </item>
  </channel>
</rss>

