<?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: SAS 9.2 Importing xlsx date as character $16 in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/SAS-9-2-Importing-xlsx-date-as-character-16/m-p/206940#M51412</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is a solution for you:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;input date $16.;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;8/27/2012 11:09&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;format good_date date9.;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;good_date = input(substr(date,1,10),mmddyy10.);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want it to import with the desired format I would check those other fields, look in the log and see if there is any additional notation regarding informat / format.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Aug 2015 17:56:11 GMT</pubDate>
    <dc:creator>Steelers_In_DC</dc:creator>
    <dc:date>2015-08-25T17:56:11Z</dc:date>
    <item>
      <title>SAS 9.2 Importing xlsx date as character $16</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-9-2-Importing-xlsx-date-as-character-16/m-p/206939#M51411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am seeking help into an issue that has been a major problem for one of my SAS 9.2 programs.&amp;nbsp; I am importing an excel.xlsx file that has 70 columns and 10,000+ rows.&amp;nbsp; For one of the columns the values are dates in excel, but when SAS imports them, they become character $16 variables (Ex. 8/27/2012 11:09).&amp;nbsp; I need these dates to be read into SAS as date9. or some other date format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE:&amp;nbsp; SAS successfully imports some other date columns correctly with the same date format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Current import statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;PROC IMPORT OUT= WORK.data&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATAFILE= "filepath" &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DBMS=excel REPLACE;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SHEET="sheetname";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp; GETNAMES=YES;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MIXED=YES;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp; SCANTEXT=YES;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; USEDATE=YES;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SCANTIME=YES;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;RUN;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions or direction would be great.&amp;nbsp; Thank you,&lt;/P&gt;&lt;P&gt;Jeff S. O.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Aug 2015 17:27:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-9-2-Importing-xlsx-date-as-character-16/m-p/206939#M51411</guid>
      <dc:creator>Jolly</dc:creator>
      <dc:date>2015-08-25T17:27:25Z</dc:date>
    </item>
    <item>
      <title>Re: SAS 9.2 Importing xlsx date as character $16</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-9-2-Importing-xlsx-date-as-character-16/m-p/206940#M51412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is a solution for you:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;input date $16.;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;8/27/2012 11:09&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;format good_date date9.;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;good_date = input(substr(date,1,10),mmddyy10.);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want it to import with the desired format I would check those other fields, look in the log and see if there is any additional notation regarding informat / format.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Aug 2015 17:56:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-9-2-Importing-xlsx-date-as-character-16/m-p/206940#M51412</guid>
      <dc:creator>Steelers_In_DC</dc:creator>
      <dc:date>2015-08-25T17:56:11Z</dc:date>
    </item>
    <item>
      <title>Re: SAS 9.2 Importing xlsx date as character $16</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-9-2-Importing-xlsx-date-as-character-16/m-p/206941#M51413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Mark, that worked great!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Aug 2015 18:12:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-9-2-Importing-xlsx-date-as-character-16/m-p/206941#M51413</guid>
      <dc:creator>Jolly</dc:creator>
      <dc:date>2015-08-25T18:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: SAS 9.2 Importing xlsx date as character $16</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-9-2-Importing-xlsx-date-as-character-16/m-p/206942#M51414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could also try formating the Excel column as a date and avoid a coded solution entirely.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Aug 2015 23:49:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-9-2-Importing-xlsx-date-as-character-16/m-p/206942#M51414</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2015-08-25T23:49:55Z</dc:date>
    </item>
  </channel>
</rss>

