<?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: Incorrect year from character date to SAS date in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Incorrect-year-from-character-date-to-SAS-date/m-p/754043#M237725</link>
    <description>&lt;P&gt;You set strdate with a length of 11, but read only 9 characters in the INPUT function (because you use the date&lt;FONT color="#FF0000"&gt;9&lt;/FONT&gt;. informat), so you get the result of converting "13 APR 20".&lt;/P&gt;
&lt;P&gt;Either remove the blanks, or use the date&lt;FONT color="#FF0000"&gt;11&lt;/FONT&gt;. informat.&lt;/P&gt;</description>
    <pubDate>Wed, 14 Jul 2021 11:46:37 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2021-07-14T11:46:37Z</dc:date>
    <item>
      <title>Incorrect year from character date to SAS date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Incorrect-year-from-character-date-to-SAS-date/m-p/754040#M237723</link>
      <description>&lt;P&gt;&lt;FONT face="andale mono,times"&gt;Dear All,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="andale mono,times"&gt;Could you please point me out the what's wrong with my code? &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times"&gt;Why it is giving me the year of 2020 instead of 2021?&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="andale mono,times"&gt;Thanks a lot.&lt;/FONT&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;FONT face="andale mono,times"&gt;&lt;CODE class=" language-sas"&gt;data _null_;
strdate="13 APR 2021";
sasdate=input(strdate,date9.);
format sasdate yymmdd10.;
put strdate=; 
put sasdate=;
run;&lt;/CODE&gt;&lt;/FONT&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;FONT face="andale mono,times"&gt;&lt;CODE class=" language-sas"&gt;strdate=13 APR 2021
sasdate=2020-04-13&lt;/CODE&gt;&lt;/FONT&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jul 2021 11:40:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Incorrect-year-from-character-date-to-SAS-date/m-p/754040#M237723</guid>
      <dc:creator>Miracle</dc:creator>
      <dc:date>2021-07-14T11:40:44Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect year from character date to SAS date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Incorrect-year-from-character-date-to-SAS-date/m-p/754043#M237725</link>
      <description>&lt;P&gt;You set strdate with a length of 11, but read only 9 characters in the INPUT function (because you use the date&lt;FONT color="#FF0000"&gt;9&lt;/FONT&gt;. informat), so you get the result of converting "13 APR 20".&lt;/P&gt;
&lt;P&gt;Either remove the blanks, or use the date&lt;FONT color="#FF0000"&gt;11&lt;/FONT&gt;. informat.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jul 2021 11:46:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Incorrect-year-from-character-date-to-SAS-date/m-p/754043#M237725</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-07-14T11:46:37Z</dc:date>
    </item>
  </channel>
</rss>

