<?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: Converting date to date9. gives wrong dates in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Converting-date-to-date9-gives-wrong-dates/m-p/678934#M205010</link>
    <description>&lt;P&gt;So you have certain values in your date column that are neither dates nor missing (empty), which causes PROC IMPORT to import that as character. Either fix the values in the spreadsheet, or run a correcting data step on the imported dataset:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data import2 (drop=_date);
set import (rename=(date=_date));
date = input(_date, informat.);
format date date9.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Insert the fitting informat in place of "informat.".&lt;/P&gt;</description>
    <pubDate>Mon, 24 Aug 2020 17:01:07 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2020-08-24T17:01:07Z</dc:date>
    <item>
      <title>Converting date to date9. gives wrong dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Converting-date-to-date9-gives-wrong-dates/m-p/678927#M205004</link>
      <description>&lt;P&gt;Hi there, when converting dates imported from excel to date9. I am receiving the wrong dates. When reviewing the proc contents, I noticed the format and informat of my imported variable is $10. Does anyone have a suggestion on how I can properly convert the dates to date9.?&lt;/P&gt;</description>
      <pubDate>Mon, 24 Aug 2020 16:52:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Converting-date-to-date9-gives-wrong-dates/m-p/678927#M205004</guid>
      <dc:creator>advmsj</dc:creator>
      <dc:date>2020-08-24T16:52:54Z</dc:date>
    </item>
    <item>
      <title>Re: Converting date to date9. gives wrong dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Converting-date-to-date9-gives-wrong-dates/m-p/678934#M205010</link>
      <description>&lt;P&gt;So you have certain values in your date column that are neither dates nor missing (empty), which causes PROC IMPORT to import that as character. Either fix the values in the spreadsheet, or run a correcting data step on the imported dataset:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data import2 (drop=_date);
set import (rename=(date=_date));
date = input(_date, informat.);
format date date9.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Insert the fitting informat in place of "informat.".&lt;/P&gt;</description>
      <pubDate>Mon, 24 Aug 2020 17:01:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Converting-date-to-date9-gives-wrong-dates/m-p/678934#M205010</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-08-24T17:01:07Z</dc:date>
    </item>
    <item>
      <title>Re: Converting date to date9. gives wrong dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Converting-date-to-date9-gives-wrong-dates/m-p/678940#M205015</link>
      <description>&lt;P&gt;Perfect, thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 24 Aug 2020 17:14:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Converting-date-to-date9-gives-wrong-dates/m-p/678940#M205015</guid>
      <dc:creator>advmsj</dc:creator>
      <dc:date>2020-08-24T17:14:10Z</dc:date>
    </item>
  </channel>
</rss>

