<?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 dates from excel in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Reading-dates-from-excel/m-p/589204#M14872</link>
    <description>&lt;P&gt;It is October of 2016.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 16 Sep 2019 21:29:37 GMT</pubDate>
    <dc:creator>sasuser1031</dc:creator>
    <dc:date>2019-09-16T21:29:37Z</dc:date>
    <item>
      <title>Reading dates from excel</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Reading-dates-from-excel/m-p/589197#M14868</link>
      <description>&lt;P&gt;I have date format 16-Oct in excel. How can I import in date format in SAS?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;data a;&lt;BR /&gt;infile "&amp;amp;input.&amp;amp;data." delimiter = ',' MISSOVER DSD lrecl=32767 firstobs=2 ;&lt;BR /&gt;informat date yymmdd6. ;&lt;BR /&gt;format date yymmdd6. ;&lt;BR /&gt;input date;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;This code&amp;nbsp;&amp;nbsp;gives missing values in date column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2019 21:08:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Reading-dates-from-excel/m-p/589197#M14868</guid>
      <dc:creator>sasuser1031</dc:creator>
      <dc:date>2019-09-16T21:08:49Z</dc:date>
    </item>
    <item>
      <title>Re: Reading dates from excel</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Reading-dates-from-excel/m-p/589199#M14869</link>
      <description>&lt;P&gt;Do you have an Excel file or a text file? You cannot read an Excel file as if it was a text file.&amp;nbsp; To read from an Excel file you will need to use PROC IMPORT or use LIBNAME statement to point at the workbook and read the sheets out as datasets.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you do have a text file then you need a different informat.&amp;nbsp; The YYMMDD informat expects to have numeric Year, Month and Day values, in that order.&amp;nbsp; Try using the ANYDTDTE. informat instead.&amp;nbsp; Otherwise read it as a string and convert the string into a format that one of the SAS date informats can read.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2019 21:15:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Reading-dates-from-excel/m-p/589199#M14869</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-09-16T21:15:20Z</dc:date>
    </item>
    <item>
      <title>Re: Reading dates from excel</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Reading-dates-from-excel/m-p/589201#M14870</link>
      <description>&lt;P&gt;It's excel file. There are more than 200 variables and more than 10 date columns. Other date formats read well, but this date format is not working. I also tried using&amp;nbsp;&lt;SPAN&gt;ANYDTDTE but&amp;nbsp; didn't work.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2019 21:19:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Reading-dates-from-excel/m-p/589201#M14870</guid>
      <dc:creator>sasuser1031</dc:creator>
      <dc:date>2019-09-16T21:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: Reading dates from excel</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Reading-dates-from-excel/m-p/589202#M14871</link>
      <description>&lt;P&gt;What date do you think 16-Oct represents?&amp;nbsp; It is the 16th of October of the current year?&amp;nbsp; Is any day in in October of 2016?&amp;nbsp; Or perhaps any day in October of 1916?&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2019 21:26:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Reading-dates-from-excel/m-p/589202#M14871</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-09-16T21:26:57Z</dc:date>
    </item>
    <item>
      <title>Re: Reading dates from excel</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Reading-dates-from-excel/m-p/589204#M14872</link>
      <description>&lt;P&gt;It is October of 2016.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2019 21:29:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Reading-dates-from-excel/m-p/589204#M14872</guid>
      <dc:creator>sasuser1031</dc:creator>
      <dc:date>2019-09-16T21:29:37Z</dc:date>
    </item>
    <item>
      <title>Re: Reading dates from excel</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Reading-dates-from-excel/m-p/589205#M14873</link>
      <description>You cannot specify the types when importing Excel data.&lt;BR /&gt;&lt;BR /&gt; When you import it, what does it look like? You'll need to convert it from Excel to a SAS date, most likely character to date?</description>
      <pubDate>Mon, 16 Sep 2019 21:33:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Reading-dates-from-excel/m-p/589205#M14873</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-09-16T21:33:39Z</dc:date>
    </item>
    <item>
      <title>Re: Reading dates from excel</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Reading-dates-from-excel/m-p/589210#M14874</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/75014"&gt;@sasuser1031&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;It is October of 2016.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I suggest going into Excel, finding that cell and using the Format Cells option set that cell to a format that shows day, month and year. Every value I have seen in Excel that is an actual date that looks like 16-Oct is 16 Oct of the current year when entered. Month and year normally appear as Oct-16.&amp;nbsp;If you have&amp;nbsp;created a custom date appearance that wouldn't be the case but I see very few people do that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And perhaps set the entire column the selected the date format. You might find that your "dates" are actually character or possibly even worse a mixture of character and Excel date values.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2019 22:26:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Reading-dates-from-excel/m-p/589210#M14874</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-09-16T22:26:35Z</dc:date>
    </item>
  </channel>
</rss>

