<?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: format excel date to sas date in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/format-excel-date-to-sas-date/m-p/107082#M258597</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try applying a format such as mmddyy10 to the SAS data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example:&lt;/P&gt;&lt;P&gt;Proc print data=work.a;&lt;/P&gt;&lt;P&gt;var date;&lt;/P&gt;&lt;P&gt;format data mmddyy10.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;The numeric values in the SAS data set are the number of days since 1 Jan 1960 and formats will display those numbers in a more human readable version.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Jul 2012 22:09:53 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2012-07-13T22:09:53Z</dc:date>
    <item>
      <title>format excel date to sas date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/format-excel-date-to-sas-date/m-p/107081#M258596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;I have a data set in excel which has some date information. I am trying to import it to sas. I have formated the date coloum in excel to date. As a result, in excel I can read the dates as mm/dd/yy. However when I import the data to SAS and read the dates, it is in different format. Also the date column is converted into character. For instance, the data in excel is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Firm&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date&lt;/P&gt;&lt;P&gt;A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 05/22/2008&lt;/P&gt;&lt;P&gt;B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2/19/2003&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I read the date in the SAS, it looks as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Firm&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date&lt;/P&gt;&lt;P&gt;A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 39590&lt;/P&gt;&lt;P&gt;B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 37671&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code I used to import the excel file into SAS is:&lt;/P&gt;&lt;P&gt;proc import out=work.a&lt;/P&gt;&lt;P&gt;datafile = "c:\users\destop\sas\b.xls"&lt;/P&gt;&lt;P&gt;dbms =xls replace;&lt;/P&gt;&lt;P&gt;getnames=yes;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would appreciate if someone help me modify this code so that I can read the date correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jul 2012 20:05:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/format-excel-date-to-sas-date/m-p/107081#M258596</guid>
      <dc:creator>shalmali</dc:creator>
      <dc:date>2012-07-13T20:05:18Z</dc:date>
    </item>
    <item>
      <title>Re: format excel date to sas date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/format-excel-date-to-sas-date/m-p/107082#M258597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try applying a format such as mmddyy10 to the SAS data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example:&lt;/P&gt;&lt;P&gt;Proc print data=work.a;&lt;/P&gt;&lt;P&gt;var date;&lt;/P&gt;&lt;P&gt;format data mmddyy10.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;The numeric values in the SAS data set are the number of days since 1 Jan 1960 and formats will display those numbers in a more human readable version.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jul 2012 22:09:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/format-excel-date-to-sas-date/m-p/107082#M258597</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2012-07-13T22:09:53Z</dc:date>
    </item>
  </channel>
</rss>

