<?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: reading sas date from excel to sas in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Reading-sas-date-from-csv/m-p/303881#M64619</link>
    <description>thanks LinusH</description>
    <pubDate>Tue, 11 Oct 2016 20:51:04 GMT</pubDate>
    <dc:creator>ari</dc:creator>
    <dc:date>2016-10-11T20:51:04Z</dc:date>
    <item>
      <title>Reading sas date from csv</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-sas-date-from-csv/m-p/303598#M64518</link>
      <description>&lt;P&gt;I am trying to read a date column in sas from csv file but it gives some error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;error:&amp;nbsp;NOTE: Invalid argument to function INPUT at line 2134 column 11&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate &amp;nbsp;any help to resolve this issue. Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data:&lt;/P&gt;&lt;P&gt;have:&lt;/P&gt;&lt;P&gt;id &amp;nbsp; date&lt;/P&gt;&lt;P&gt;1 &amp;nbsp; &amp;nbsp;27-Apr-12&lt;/P&gt;&lt;P&gt;2 &amp;nbsp; &amp;nbsp;03APR2013&lt;/P&gt;&lt;P&gt;3 &amp;nbsp; &amp;nbsp;11-Mar-13&lt;/P&gt;&lt;P&gt;4 &amp;nbsp; 01-Jun-12&lt;/P&gt;&lt;P&gt;my code:&lt;/P&gt;&lt;P&gt;data want;&lt;BR /&gt;set have;&lt;BR /&gt;format date date9.;&lt;BR /&gt;date=upcase(date);&lt;/P&gt;&lt;P&gt;if not missing(date) then do;&lt;BR /&gt;lbdt=input(date, ddmmyy9.);&lt;BR /&gt;end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Oct 2016 20:41:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-sas-date-from-csv/m-p/303598#M64518</guid>
      <dc:creator>ari</dc:creator>
      <dc:date>2016-10-11T20:41:34Z</dc:date>
    </item>
    <item>
      <title>Re: reading sas date from excel to sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-sas-date-from-csv/m-p/303621#M64526</link>
      <description>Yeah, your format doesn't match your date on every observation. &lt;BR /&gt; Otherwise sure, anydt might work (as a last resort - try to get clean data from your supplier is the no 1 option).</description>
      <pubDate>Mon, 10 Oct 2016 17:44:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-sas-date-from-csv/m-p/303621#M64526</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-10-10T17:44:41Z</dc:date>
    </item>
    <item>
      <title>Re: reading sas date from excel to sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-sas-date-from-csv/m-p/303666#M64548</link>
      <description>&lt;P&gt;SAS offers generic date formats such as ANYDTDTE. to handle this kind of poor quality data. Try:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input id   date :$20.;
datalines;
1    27-Apr-12
2    03APR2013
3    11-Mar-13
4   01-Jun-12
;

data want;
set have;
d = input(date, ?? anydtdte.);
format d yymmdd10.;
drop date;
rename d=date;
run;

proc print; run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Oct 2016 20:58:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-sas-date-from-csv/m-p/303666#M64548</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-10-10T20:58:37Z</dc:date>
    </item>
    <item>
      <title>Re: reading sas date from excel to sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-sas-date-from-csv/m-p/303734#M64571</link>
      <description>&lt;P&gt;Simple answer, clean your data. &amp;nbsp;27-Apr-12 is not the same as 27APR2012 or in fact 20120427. &amp;nbsp;What if you have dates in US format:&lt;/P&gt;
&lt;P&gt;02012012 - is this 02Jan or 01Feb? &amp;nbsp;Garbage data will 90% of the time yield garbage results.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And a secondary note, CSV is not Excel, CSV=Comam Separated Variable file, which is a plain text file with commas separating data elements. &amp;nbsp;The fact that Excel has a parser for that doesn't make it an Excel file.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Oct 2016 08:53:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-sas-date-from-csv/m-p/303734#M64571</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-10-11T08:53:05Z</dc:date>
    </item>
    <item>
      <title>Re: Reading sas date from csv</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-sas-date-from-csv/m-p/303764#M64581</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input id   date : date11.;
format date date9.;
datalines;
1    27-Apr-12
2    03APR2013
3    11-Mar-13
4   01-Jun-12
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 11 Oct 2016 12:37:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-sas-date-from-csv/m-p/303764#M64581</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-10-11T12:37:30Z</dc:date>
    </item>
    <item>
      <title>Re: Reading sas date from csv</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-sas-date-from-csv/m-p/303879#M64617</link>
      <description>Thanks Ksharp</description>
      <pubDate>Tue, 11 Oct 2016 20:50:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-sas-date-from-csv/m-p/303879#M64617</guid>
      <dc:creator>ari</dc:creator>
      <dc:date>2016-10-11T20:50:19Z</dc:date>
    </item>
    <item>
      <title>Re: reading sas date from excel to sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-sas-date-from-csv/m-p/303880#M64618</link>
      <description>thanks PG</description>
      <pubDate>Tue, 11 Oct 2016 20:50:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-sas-date-from-csv/m-p/303880#M64618</guid>
      <dc:creator>ari</dc:creator>
      <dc:date>2016-10-11T20:50:51Z</dc:date>
    </item>
    <item>
      <title>Re: reading sas date from excel to sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-sas-date-from-csv/m-p/303881#M64619</link>
      <description>thanks LinusH</description>
      <pubDate>Tue, 11 Oct 2016 20:51:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-sas-date-from-csv/m-p/303881#M64619</guid>
      <dc:creator>ari</dc:creator>
      <dc:date>2016-10-11T20:51:04Z</dc:date>
    </item>
  </channel>
</rss>

