<?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: issue in reading a date. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/issue-in-reading-a-date/m-p/664933#M198718</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/269825"&gt;@Anmolkhandelwal&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;and to which date should the string "Nov 14 2" translate? What would be the rule for the translation? &lt;BR /&gt;AK: this date translate to enddat. the expected result is to read this date in mmddyy10. format.&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I did NOT ask for the NAME of the future variable, but for the VALUE that should come out of "Nov 14 2".&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Well, Kurt, obviously this means '14Nov2'd - or in yyyy-mm-dd: 2-11-14 &lt;span class="lia-unicode-emoji" title=":nerd_face:"&gt;🤓&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Anything else would not make any sense at all or imply heavy guesswork.&lt;/P&gt;</description>
    <pubDate>Thu, 25 Jun 2020 09:41:14 GMT</pubDate>
    <dc:creator>andreas_lds</dc:creator>
    <dc:date>2020-06-25T09:41:14Z</dc:date>
    <item>
      <title>issue in reading a date.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/issue-in-reading-a-date/m-p/664900#M198698</link>
      <description>&lt;P&gt;I have delimeted source file to be read in. there are some date fields with data such as given below.&lt;/P&gt;
&lt;P&gt;dat1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dat2&lt;/P&gt;
&lt;TABLE width="176"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="75"&gt;11/14/2018&lt;/TD&gt;
&lt;TD width="101"&gt;Nov 14 2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;11/15/2018&lt;/TD&gt;
&lt;TD&gt;Nov 15 2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;11/15/2018&lt;/TD&gt;
&lt;TD&gt;Nov 15 2&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;i need to read these values in format&amp;nbsp;mmddyy10.&lt;/P&gt;
&lt;P&gt;TIA&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jun 2020 08:14:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/issue-in-reading-a-date/m-p/664900#M198698</guid>
      <dc:creator>Anmolkhandelwal</dc:creator>
      <dc:date>2020-06-25T08:14:10Z</dc:date>
    </item>
    <item>
      <title>Re: issue in reading a date.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/issue-in-reading-a-date/m-p/664903#M198700</link>
      <description>&lt;P&gt;Please post the real contents of the file. Open it with an editor (not with Excel or similar!), and copy/paste the first few lines into a window opened with this button:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2020-04-07 um 08.32.59.jpg"&gt;&lt;img src="https://communities.sas.com/skins/images/8D8B612AA6AB1DC7E9A0812281D56E02/responsive_peak/images/image_not_found.png" alt="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also show us your code, so we can tell you where you went wrong. Use the "little running man" right next to the button indicated above to post the code.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jun 2020 08:19:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/issue-in-reading-a-date/m-p/664903#M198700</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-06-25T08:19:42Z</dc:date>
    </item>
    <item>
      <title>Re: issue in reading a date.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/issue-in-reading-a-date/m-p/664904#M198701</link>
      <description>&lt;P&gt;1) What code have you used to read those dates?&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Reading dat1 with mmddyy10. informat should result correctly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Have you defined a format to DAT1 ? (like ddmmyy10., mmddyy10., date9. etc.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2) Dat2 seems to be truncated.&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Please copy paste few lines from the input file into &amp;lt;/&amp;gt; icon.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3) In case of any issue it is very helpful to attach the log using the &amp;lt;/&amp;gt; icon.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jun 2020 08:26:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/issue-in-reading-a-date/m-p/664904#M198701</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2020-06-25T08:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: issue in reading a date.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/issue-in-reading-a-date/m-p/664908#M198705</link>
      <description>SVCDAT	ENDDAT&lt;BR /&gt;11/14/2018	Nov 14 2&lt;BR /&gt;11/15/2018	Nov 15 2&lt;BR /&gt;11/15/2018	Nov 15 2&lt;BR /&gt;11/17/2018	Nov 17 2&lt;BR /&gt;here is my input data.&lt;BR /&gt;i have been able to read SVCDAT using mmddyy10. informat.&lt;BR /&gt;not able to read the enddat.</description>
      <pubDate>Thu, 25 Jun 2020 08:38:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/issue-in-reading-a-date/m-p/664908#M198705</guid>
      <dc:creator>Anmolkhandelwal</dc:creator>
      <dc:date>2020-06-25T08:38:09Z</dc:date>
    </item>
    <item>
      <title>Re: issue in reading a date.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/issue-in-reading-a-date/m-p/664909#M198706</link>
      <description>&lt;P&gt;This is not a delimited file; unless the blank is the delimiter, which would mean it has 4 columns instead of 2.&lt;/P&gt;
&lt;P&gt;Please read my post again on how to post the REAL contents of the file.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jun 2020 08:41:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/issue-in-reading-a-date/m-p/664909#M198706</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-06-25T08:41:23Z</dc:date>
    </item>
    <item>
      <title>Re: issue in reading a date.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/issue-in-reading-a-date/m-p/664913#M198709</link>
      <description>&lt;PRE&gt;DATA sampledata;
     INPUT @6 svcdat mmddyy10. @15 endat mmddyy10.;
    CARDS;
     11/14/2018 nov 2 2;
  ;
RUN;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Here is something i was trying, but the code for endata is completely wrong.&lt;/P&gt;
&lt;P&gt;the enddat is present in my input in this type:&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="101"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="101"&gt;Nov 14 2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Nov 15 2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Nov 15 2&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;i won't be able to add the source file data due to restrictions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jun 2020 08:57:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/issue-in-reading-a-date/m-p/664913#M198709</guid>
      <dc:creator>Anmolkhandelwal</dc:creator>
      <dc:date>2020-06-25T08:57:14Z</dc:date>
    </item>
    <item>
      <title>Re: issue in reading a date.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/issue-in-reading-a-date/m-p/664915#M198710</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/269825"&gt;@Anmolkhandelwal&lt;/a&gt;&amp;nbsp;wrote:
&lt;P&gt;i won't be able to add the source file data due to restrictions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Without seeing the original data in its raw form (with the real delimiters, and the real layout of the columns), it is impossible to help you.&lt;/P&gt;
&lt;P&gt;It is also impossible to make a date out of this:&lt;/P&gt;
&lt;PRE&gt;Nov 14 2&lt;/PRE&gt;
&lt;P&gt;because "2" is not a valid year.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jun 2020 09:06:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/issue-in-reading-a-date/m-p/664915#M198710</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-06-25T09:06:17Z</dc:date>
    </item>
    <item>
      <title>Re: issue in reading a date.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/issue-in-reading-a-date/m-p/664920#M198711</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Anmolkhandelwal_0-1593076306991.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/46644i96F6BACB3E14A960/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Anmolkhandelwal_0-1593076306991.png" alt="Anmolkhandelwal_0-1593076306991.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Here is a screenshot of the input source file. the two dates are SVCDAT and ENDDAT.&lt;/P&gt;
&lt;P&gt;if this may help.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jun 2020 09:13:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/issue-in-reading-a-date/m-p/664920#M198711</guid>
      <dc:creator>Anmolkhandelwal</dc:creator>
      <dc:date>2020-06-25T09:13:04Z</dc:date>
    </item>
    <item>
      <title>Re: issue in reading a date.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/issue-in-reading-a-date/m-p/664926#M198713</link>
      <description>&lt;P&gt;And to which date should the string "Nov 14 2" translate? What would be the rule for the translation?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To me it seems that somewhere further up in the process a longer string was read into a default 8-character variable, causing truncation of values.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jun 2020 09:18:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/issue-in-reading-a-date/m-p/664926#M198713</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-06-25T09:18:45Z</dc:date>
    </item>
    <item>
      <title>Re: issue in reading a date.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/issue-in-reading-a-date/m-p/664928#M198715</link>
      <description>and to which date should the string "Nov 14 2" translate? What would be the rule for the translation?  &lt;BR /&gt;AK: this date translate to enddat. the expected result is to read this date in mmddyy10. format.&lt;BR /&gt;</description>
      <pubDate>Thu, 25 Jun 2020 09:24:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/issue-in-reading-a-date/m-p/664928#M198715</guid>
      <dc:creator>Anmolkhandelwal</dc:creator>
      <dc:date>2020-06-25T09:24:21Z</dc:date>
    </item>
    <item>
      <title>Re: issue in reading a date.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/issue-in-reading-a-date/m-p/664929#M198716</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/269825"&gt;@Anmolkhandelwal&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;and to which date should the string "Nov 14 2" translate? What would be the rule for the translation? &lt;BR /&gt;AK: this date translate to enddat. the expected result is to read this date in mmddyy10. format.&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I did NOT ask for the NAME of the future variable, but for the VALUE that should come out of "Nov 14 2".&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jun 2020 09:32:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/issue-in-reading-a-date/m-p/664929#M198716</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-06-25T09:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: issue in reading a date.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/issue-in-reading-a-date/m-p/664932#M198717</link>
      <description>the value that is expected out of this date is: 11-14-2018.</description>
      <pubDate>Thu, 25 Jun 2020 09:39:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/issue-in-reading-a-date/m-p/664932#M198717</guid>
      <dc:creator>Anmolkhandelwal</dc:creator>
      <dc:date>2020-06-25T09:39:29Z</dc:date>
    </item>
    <item>
      <title>Re: issue in reading a date.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/issue-in-reading-a-date/m-p/664933#M198718</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/269825"&gt;@Anmolkhandelwal&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;and to which date should the string "Nov 14 2" translate? What would be the rule for the translation? &lt;BR /&gt;AK: this date translate to enddat. the expected result is to read this date in mmddyy10. format.&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I did NOT ask for the NAME of the future variable, but for the VALUE that should come out of "Nov 14 2".&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Well, Kurt, obviously this means '14Nov2'd - or in yyyy-mm-dd: 2-11-14 &lt;span class="lia-unicode-emoji" title=":nerd_face:"&gt;🤓&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Anything else would not make any sense at all or imply heavy guesswork.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jun 2020 09:41:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/issue-in-reading-a-date/m-p/664933#M198718</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2020-06-25T09:41:14Z</dc:date>
    </item>
    <item>
      <title>Re: issue in reading a date.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/issue-in-reading-a-date/m-p/664935#M198719</link>
      <description>&lt;P&gt;And what should be the result of input string "Jan 1 1"?&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jun 2020 09:55:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/issue-in-reading-a-date/m-p/664935#M198719</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-06-25T09:55:31Z</dc:date>
    </item>
    <item>
      <title>Re: issue in reading a date.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/issue-in-reading-a-date/m-p/664982#M198744</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/269825"&gt;@Anmolkhandelwal&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Anmolkhandelwal_0-1593076306991.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/46644i96F6BACB3E14A960/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Anmolkhandelwal_0-1593076306991.png" alt="Anmolkhandelwal_0-1593076306991.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Here is a screenshot of the input source file. the two dates are SVCDAT and ENDDAT.&lt;/P&gt;
&lt;P&gt;if this may help.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;What is the origin to that input file?&lt;/P&gt;
&lt;P&gt;Did you created it or did you got it from someone?&lt;/P&gt;
&lt;P&gt;I have the filling that those dates having value like 'Nov 17 2' were truncated or&lt;/P&gt;
&lt;P&gt;that those variables are concatenation of more then one variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please check what is origin of those corrupted dates.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jun 2020 12:18:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/issue-in-reading-a-date/m-p/664982#M198744</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2020-06-25T12:18:06Z</dc:date>
    </item>
  </channel>
</rss>

