<?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 changing date format to a number on import? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-changing-date-format-to-a-number-on-import/m-p/810959#M319837</link>
    <description>&lt;P&gt;Save the data as csv from Excel, inspect it with a text editor to see how the values are stored, and the read it with a data step according to your findings.&lt;/P&gt;</description>
    <pubDate>Sun, 01 May 2022 19:20:22 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2022-05-01T19:20:22Z</dc:date>
    <item>
      <title>SAS changing date format to a number on import?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-changing-date-format-to-a-number-on-import/m-p/810957#M319835</link>
      <description>&lt;P&gt;For the data set I am working with, I have a date column. For example, when looking at Excel for one row, the date value is "11/2/2020"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I import into SAS and look at proc contents, it says that the entire column is a character type, $1 format. The value for the example row I gave above became 2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is another date column in the data set that isn't having this problem? Thanks.&lt;/P&gt;</description>
      <pubDate>Sun, 01 May 2022 19:15:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-changing-date-format-to-a-number-on-import/m-p/810957#M319835</guid>
      <dc:creator>littleka</dc:creator>
      <dc:date>2022-05-01T19:15:47Z</dc:date>
    </item>
    <item>
      <title>Re: SAS changing date format to a number on import?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-changing-date-format-to-a-number-on-import/m-p/810959#M319837</link>
      <description>&lt;P&gt;Save the data as csv from Excel, inspect it with a text editor to see how the values are stored, and the read it with a data step according to your findings.&lt;/P&gt;</description>
      <pubDate>Sun, 01 May 2022 19:20:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-changing-date-format-to-a-number-on-import/m-p/810959#M319837</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-05-01T19:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: SAS changing date format to a number on import?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-changing-date-format-to-a-number-on-import/m-p/810963#M319841</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/424395"&gt;@littleka&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;For the data set I am working with, I have a date column. For example, when looking at Excel for one row, the date value is "11/2/2020"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I import into SAS and look at proc contents, it says that the entire column is a character type, $1 format. The value for the example row I gave above became 2.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is another date column in the data set that isn't having this problem? Thanks.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;How did you read the data into SAS.&amp;nbsp; Did you use PROC IMPORT? Show the code you ran.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What type of file do you actually have?&amp;nbsp; If it is an actual EXCEL file such as XLSX file or even the older XLS file then what you describe cannot happen.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it is instead a text file, like a CSV file, then just write your own data step to read the file and you will have full control over how the variables are read.&lt;/P&gt;</description>
      <pubDate>Sun, 01 May 2022 19:29:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-changing-date-format-to-a-number-on-import/m-p/810963#M319841</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-05-01T19:29:40Z</dc:date>
    </item>
    <item>
      <title>Re: SAS changing date format to a number on import?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-changing-date-format-to-a-number-on-import/m-p/810971#M319846</link>
      <description>I tried exporting the data file as an XLSX file and that preserved the correct format. Thanks!</description>
      <pubDate>Sun, 01 May 2022 21:56:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-changing-date-format-to-a-number-on-import/m-p/810971#M319846</guid>
      <dc:creator>littleka</dc:creator>
      <dc:date>2022-05-01T21:56:28Z</dc:date>
    </item>
  </channel>
</rss>

