<?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: Importing csv file with date format error in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Importing-csv-file-with-date-format-error/m-p/692779#M211112</link>
    <description>&lt;P&gt;You did not assigned &lt;STRONG&gt;informat&lt;/STRONG&gt; for the input date.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please post:&lt;/P&gt;
&lt;UL class="lia-list-style-type-circle"&gt;
&lt;LI&gt;a sample of your input CSV file - at least 3 lines.&lt;/LI&gt;
&lt;LI&gt;please post the &lt;STRONG&gt;full&lt;/STRONG&gt; log.&lt;/LI&gt;
&lt;LI&gt;Use the '&amp;lt;&amp;gt;' menu option and copy/paste the sample lines as the log into the open window.&lt;/LI&gt;
&lt;/UL&gt;</description>
    <pubDate>Tue, 20 Oct 2020 07:47:48 GMT</pubDate>
    <dc:creator>Shmuel</dc:creator>
    <dc:date>2020-10-20T07:47:48Z</dc:date>
    <item>
      <title>Importing csv file with date format error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-csv-file-with-date-format-error/m-p/692767#M211107</link>
      <description>&lt;P&gt;I am trying to import a csv file using the code below, however, for the date column SAS is giving me the NOTE: Invalid data for Date in line 2 40-48. And it also says DOB=. _ERROR_=1 _N_=1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data BH;&lt;/P&gt;&lt;P&gt;infile 'C:\desktop\NewDemo\apeal2.csv' dsd firstobs=2 truncover;&lt;/P&gt;&lt;P&gt;length ID 8 Race $32. Ethnicity $32 Gender $20;&lt;/P&gt;&lt;P&gt;input ID Race Ethnicity Gender Date;&lt;/P&gt;&lt;P&gt;format Date date9.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2020 07:15:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-csv-file-with-date-format-error/m-p/692767#M211107</guid>
      <dc:creator>Yughaber</dc:creator>
      <dc:date>2020-10-20T07:15:21Z</dc:date>
    </item>
    <item>
      <title>Re: Importing csv file with date format error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-csv-file-with-date-format-error/m-p/692775#M211108</link>
      <description>&lt;P&gt;There is no variable DOB in the code you posted, so the log message cannot be from that step.&lt;/P&gt;
&lt;P&gt;Please post the&amp;nbsp;&lt;EM&gt;complete&lt;/EM&gt; log from the&amp;nbsp;&lt;EM&gt;failing&lt;/EM&gt; step; use this button to post the log:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2020-04-07 um 08.32.59.jpg"&gt;&lt;img src="https://communities.sas.com/skins/images/2FD96521DCF95C42FE57BF2A7CB72678/responsive_peak/images/image_not_found.png" alt="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2020 07:43:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-csv-file-with-date-format-error/m-p/692775#M211108</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-10-20T07:43:30Z</dc:date>
    </item>
    <item>
      <title>Re: Importing csv file with date format error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-csv-file-with-date-format-error/m-p/692779#M211112</link>
      <description>&lt;P&gt;You did not assigned &lt;STRONG&gt;informat&lt;/STRONG&gt; for the input date.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please post:&lt;/P&gt;
&lt;UL class="lia-list-style-type-circle"&gt;
&lt;LI&gt;a sample of your input CSV file - at least 3 lines.&lt;/LI&gt;
&lt;LI&gt;please post the &lt;STRONG&gt;full&lt;/STRONG&gt; log.&lt;/LI&gt;
&lt;LI&gt;Use the '&amp;lt;&amp;gt;' menu option and copy/paste the sample lines as the log into the open window.&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Tue, 20 Oct 2020 07:47:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-csv-file-with-date-format-error/m-p/692779#M211112</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2020-10-20T07:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: Importing csv file with date format error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-csv-file-with-date-format-error/m-p/692942#M211197</link>
      <description>I am sorry but I don't have/see that &amp;lt;/&amp;gt; in my toolbar&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;237 data BH;&lt;BR /&gt;238 infile 'C:\desktop\NewDemo\apeal2.csv' dsd firstobs=2 truncover&lt;BR /&gt;238! firstobs=2 truncover;&lt;BR /&gt;239 length ID 8 RACE $32 ETHNICITY $40 Gender $20;&lt;BR /&gt;240 input ID RACE ETHNICITY Gender Date;&lt;BR /&gt;241 format Date mmddyy10.;&lt;BR /&gt;242 run;&lt;BR /&gt;&lt;BR /&gt;NOTE: The infile&lt;BR /&gt;'C:\desktop\NewDemo\apeal2.csv' is:&lt;BR /&gt;Filename= C:\desktop\NewDemo\apeal2.csv,&lt;BR /&gt;RECFM=V,LRECL=35677,File Size (bytes)=18522591,&lt;BR /&gt;Last Modified=19Oct2020:22:08:43,&lt;BR /&gt;Create Time=18Oct2020:00:57:44&lt;BR /&gt;&lt;BR /&gt;NOTE: Invalid data for Date in line 2 50-58.&lt;BR /&gt;RULE: ----+----1----+----2----+----3----+----4----+----5----&lt;BR /&gt;2 333333333,Other,Hispanic or Latino,Male,6/20/&lt;BR /&gt;55 1953 58&lt;BR /&gt;ID=333333333 RACE=Other ETHNICITY=Hispanic or Latino&lt;BR /&gt;Gender=Male Date=. _ERROR_=1 _N_=1&lt;BR /&gt;NOTE: Invalid data for Date in line 3 54-61.&lt;BR /&gt;3 333333333,Asian,Non Hispanic or Latino,Male,3&lt;BR /&gt;55 /2/1970 61&lt;BR /&gt;ID=333333333 RACE=Asian ETHNICITY=Non Hispanic or Latino&lt;BR /&gt;Gender=Male Date=. _ERROR_=1 _N_=2</description>
      <pubDate>Tue, 20 Oct 2020 16:17:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-csv-file-with-date-format-error/m-p/692942#M211197</guid>
      <dc:creator>Yughaber</dc:creator>
      <dc:date>2020-10-20T16:17:14Z</dc:date>
    </item>
    <item>
      <title>Re: Importing csv file with date format error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-csv-file-with-date-format-error/m-p/692948#M211202</link>
      <description>&lt;P&gt;Add a delimiter to the INFILE statement, and the proper informat:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data BH;
infile
  'C:\desktop\NewDemo\apeal2.csv'
  dlm=','
  dsd
  firstobs=2
  truncover
;
length ID 8 RACE $32 ETHNICITY $40 Gender $20 date 4;
input ID RACE ETHNICITY Gender Date :mmddyy10.;
format Date mmddyy10.;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 20 Oct 2020 16:33:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-csv-file-with-date-format-error/m-p/692948#M211202</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-10-20T16:33:47Z</dc:date>
    </item>
    <item>
      <title>Re: Importing csv file with date format error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-csv-file-with-date-format-error/m-p/692996#M211236</link>
      <description>Thank you so much!! This worked &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; I was pounding my head for so long. I've been following your replies in numerous posts and there is a lot to learn from you.</description>
      <pubDate>Tue, 20 Oct 2020 19:56:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-csv-file-with-date-format-error/m-p/692996#M211236</guid>
      <dc:creator>Yughaber</dc:creator>
      <dc:date>2020-10-20T19:56:34Z</dc:date>
    </item>
  </channel>
</rss>

