<?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 reading dates in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/reading-dates/m-p/721277#M223540</link>
    <description>&lt;P&gt;There is a column of DATE with diff formats, I want to write a dynamic code that can read all these dates:&lt;BR /&gt;DATE&lt;BR /&gt;20112017 (DDMMYYYY)&lt;BR /&gt;21072017 (DDMMYYYY)&lt;BR /&gt;09212017 (MMDDYYYY)&lt;BR /&gt;01JAN2017 (DDMONYYYY)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please help.&lt;/P&gt;</description>
    <pubDate>Tue, 23 Feb 2021 14:48:07 GMT</pubDate>
    <dc:creator>Aexor</dc:creator>
    <dc:date>2021-02-23T14:48:07Z</dc:date>
    <item>
      <title>reading dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/reading-dates/m-p/721277#M223540</link>
      <description>&lt;P&gt;There is a column of DATE with diff formats, I want to write a dynamic code that can read all these dates:&lt;BR /&gt;DATE&lt;BR /&gt;20112017 (DDMMYYYY)&lt;BR /&gt;21072017 (DDMMYYYY)&lt;BR /&gt;09212017 (MMDDYYYY)&lt;BR /&gt;01JAN2017 (DDMONYYYY)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please help.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2021 14:48:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/reading-dates/m-p/721277#M223540</guid>
      <dc:creator>Aexor</dc:creator>
      <dc:date>2021-02-23T14:48:07Z</dc:date>
    </item>
    <item>
      <title>Re: reading dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/reading-dates/m-p/721289#M223547</link>
      <description>&lt;P&gt;If some of the dates have month before day, and other dates have day before month, then you are in a situation where no global answer exists. Although 20112017 must be day 20 of month 11 (because it can't be day 11 of month 20), there is no way for anyone to know which is the day and which is the month if your input data 04112017.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, you have to make a decision about how these inputs should be handled. This really isn't a SAS question any more, this is a question for you to decide.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2021 15:09:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/reading-dates/m-p/721289#M223547</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-02-23T15:09:15Z</dc:date>
    </item>
    <item>
      <title>Re: reading dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/reading-dates/m-p/721290#M223548</link>
      <description>&lt;P&gt;Try the ANYDTDTE. informat.&lt;/P&gt;
&lt;P&gt;Then look at results very closely because it is very likely to make assumptions, the similar to the way you would looking at some of those values.&lt;/P&gt;
&lt;P&gt;I hope you don't have any 6-digit versions as with inconsistent layouts you cannot tell what 010203 would actually represent.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2021 15:10:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/reading-dates/m-p/721290#M223548</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-02-23T15:10:06Z</dc:date>
    </item>
    <item>
      <title>Re: reading dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/reading-dates/m-p/721535#M223658</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input DATE : $20. format : $20. ;
want=inputn(date,format);
format want date9.;
cards;
20112017 DDMMYY10.
21072017 DDMMYY10.
09212017 MMDDYY10.
01JAN2017 DATE9. 
;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 24 Feb 2021 11:48:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/reading-dates/m-p/721535#M223658</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-02-24T11:48:01Z</dc:date>
    </item>
  </channel>
</rss>

