<?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: Date showing as numeric at input in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Date-showing-as-numeric-at-input/m-p/436040#M108390</link>
    <description>&lt;P&gt;We can't help unless you post what your date input data looks like and the actual full code that is reading it.&lt;/P&gt;</description>
    <pubDate>Sun, 11 Feb 2018 01:50:57 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2018-02-11T01:50:57Z</dc:date>
    <item>
      <title>Date showing as numeric at input</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-showing-as-numeric-at-input/m-p/436025#M108381</link>
      <description>&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%LET&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; inputlist= INPUT &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;State : $CHAR2.&lt;/P&gt;
&lt;P&gt;Servicer : $CHAR25.&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt; Date : &lt;/FONT&gt;&lt;FONT color="#008000" face="Courier New" size="3"&gt;/*$CHAR10.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;The above is a snippet of code.&amp;nbsp; It handles input from a share folder in which the date is inputted as a numeric.&amp;nbsp; However because it is not recognized as an actual date the field shows a blank for that value.&amp;nbsp; The only way I know around this is to read it in as a character then attempt to convert to a date.&amp;nbsp; Is there a way to convert this to a date at initial input instead?&amp;nbsp; I tried placing an 8. after Date: 8. however that does not show the date&lt;/P&gt;</description>
      <pubDate>Sun, 11 Feb 2018 00:02:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-showing-as-numeric-at-input/m-p/436025#M108381</guid>
      <dc:creator>Q1983</dc:creator>
      <dc:date>2018-02-11T00:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: Date showing as numeric at input</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-showing-as-numeric-at-input/m-p/436040#M108390</link>
      <description>&lt;P&gt;We can't help unless you post what your date input data looks like and the actual full code that is reading it.&lt;/P&gt;</description>
      <pubDate>Sun, 11 Feb 2018 01:50:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-showing-as-numeric-at-input/m-p/436040#M108390</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2018-02-11T01:50:57Z</dc:date>
    </item>
    <item>
      <title>Re: Date showing as numeric at input</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-showing-as-numeric-at-input/m-p/436253#M108497</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/5629"&gt;@Q1983&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%LET&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; inputlist= INPUT &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;State : $CHAR2.&lt;/P&gt;
&lt;P&gt;Servicer : $CHAR25.&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt; Date : &lt;/FONT&gt;&lt;FONT color="#008000" face="Courier New" size="3"&gt;/*$CHAR10.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;The above is a snippet of code.&amp;nbsp; It handles input from a share folder in which the date is inputted as a numeric.&amp;nbsp; However because it is not recognized as an actual date the field shows a blank for that value.&amp;nbsp; The only way I know around this is to read it in as a character then attempt to convert to a date.&amp;nbsp; Is there a way to convert this to a date at initial input instead?&amp;nbsp; I tried placing an 8. after Date: 8. however that does not show the date&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Depending on your source file format, practically anything not binary such as txt or CSV or tab delimited or fixed column, should not have a problem reading values using a format if you know which variable and which the format should be.&lt;/P&gt;
&lt;P&gt;It might be as simple as using an INFORMAT statement before the input. It is a good idea to assign a display format as well so you aren't asking is 21347 the right value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;informat datevar date9. ;&lt;/P&gt;
&lt;P&gt;format datevar date9.;&lt;/P&gt;
&lt;P&gt;input&amp;nbsp;&amp;lt;variables&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; datevar&amp;nbsp; &amp;lt;more variables&amp;gt;;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2018 15:45:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-showing-as-numeric-at-input/m-p/436253#M108497</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-02-12T15:45:06Z</dc:date>
    </item>
  </channel>
</rss>

