<?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: Input Function char to date in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Input-Function-char-to-date/m-p/829613#M327786</link>
    <description>&lt;P&gt;I except date value from this code. e.g. 10-09-2078&lt;/P&gt;</description>
    <pubDate>Mon, 22 Aug 2022 07:38:32 GMT</pubDate>
    <dc:creator>David_Billa</dc:creator>
    <dc:date>2022-08-22T07:38:32Z</dc:date>
    <item>
      <title>Input Function char to date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Input-Function-char-to-date/m-p/829611#M327784</link>
      <description>&lt;P&gt;can someone help me resolve this error? I except date value from this code. e.g. 10-09-2078&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data test;
dt=input('43352',MMDDYY10.);
format dt MMDDYY10.;
run;&lt;/PRE&gt;
&lt;P&gt;Log:&lt;/P&gt;
&lt;PRE&gt;26         data test;
27         dt=input('43352',MMDDYY10.);
28         format dt MMDDYY10.;
29         run;

NOTE: Invalid argument to function INPUT at line 27 column 4.
dt=. _ERROR_=1 _N_=1
NOTE: Mathematical operations could not be performed at the following places. The results of the operations have been set to
      missing values&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2022 07:38:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Input-Function-char-to-date/m-p/829611#M327784</guid>
      <dc:creator>David_Billa</dc:creator>
      <dc:date>2022-08-22T07:38:09Z</dc:date>
    </item>
    <item>
      <title>Re: Input Function char to date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Input-Function-char-to-date/m-p/829612#M327785</link>
      <description>&lt;P&gt;What do you expect from this code?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2022 07:36:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Input-Function-char-to-date/m-p/829612#M327785</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2022-08-22T07:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: Input Function char to date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Input-Function-char-to-date/m-p/829613#M327786</link>
      <description>&lt;P&gt;I except date value from this code. e.g. 10-09-2078&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2022 07:38:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Input-Function-char-to-date/m-p/829613#M327786</guid>
      <dc:creator>David_Billa</dc:creator>
      <dc:date>2022-08-22T07:38:32Z</dc:date>
    </item>
    <item>
      <title>Re: Input Function char to date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Input-Function-char-to-date/m-p/829615#M327788</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/292396"&gt;@David_Billa&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I except date value from this code. e.g. 10-09-2078&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;But your input string of&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;'43352'&lt;/PRE&gt;
&lt;P&gt;very clearly does not match the structure of your date, which is required by the MMDDYY10. informat.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Simply read it as a number:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
dt = input('43352',5.);
format dt yymmdd10.;
put dt=;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Log:&lt;/P&gt;
&lt;PRE&gt; 69         data _null_;
 70         dt = input('43352',5.);
 71         format dt yymmdd10.;
 72         put dt=;
 73         run;
 
 dt=2078-09-10
&lt;/PRE&gt;</description>
      <pubDate>Mon, 22 Aug 2022 07:53:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Input-Function-char-to-date/m-p/829615#M327788</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-08-22T07:53:32Z</dc:date>
    </item>
  </channel>
</rss>

