<?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: Checking date in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Checking-date/m-p/85202#M24369</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To avoid getting messages about invalid data, you might want to replace this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,mmddyy8.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,??mmddyy8.)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Jan 2013 18:28:38 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2013-01-24T18:28:38Z</dc:date>
    <item>
      <title>Checking date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Checking-date/m-p/85197#M24364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to use an IF statement to check and see if the value I want is in the date format MMDDYY8. and if so do.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;TABLE jive-data-cell="{&amp;quot;color&amp;quot;:&amp;quot;#575757&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;left&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;NaN&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;transparent&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;}" jive-data-header="{&amp;quot;color&amp;quot;:&amp;quot;#FFFFFF&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;#6690BC&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;center&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;}"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;ENG-112 ENGLISH COMPOSITION II..... 06/30/03 CR&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;1.5&amp;nbsp; *TE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;ENG-113 ENGLISH COMPOSITION III.... 06/30/03 CR&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;1.5&amp;nbsp; *TE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;IF statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF index(row, '-')= 14 and ANYDIGIT(row)= 15&amp;nbsp; and substr(row,findc(row, '/')-2,8)= "MMDDYY8.d"&amp;nbsp; then&lt;/P&gt;&lt;P&gt;do&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ....&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2013 17:25:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Checking-date/m-p/85197#M24364</guid>
      <dc:creator>nickb</dc:creator>
      <dc:date>2013-01-24T17:25:01Z</dc:date>
    </item>
    <item>
      <title>Re: Checking date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Checking-date/m-p/85198#M24365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is your data one long string or are you trying to figure out how to parse it? I would parse it as text and then deal with it separately, you can try anydtdte format as well as an informat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2013 17:28:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Checking-date/m-p/85198#M24365</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-01-24T17:28:40Z</dc:date>
    </item>
    <item>
      <title>Re: Checking date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Checking-date/m-p/85199#M24366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is one long string.&amp;nbsp; I plan on parsing it but i need the IF statement to check and make sure I want the values. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2013 17:49:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Checking-date/m-p/85199#M24366</guid>
      <dc:creator>nickb</dc:creator>
      <dc:date>2013-01-24T17:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: Checking date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Checking-date/m-p/85200#M24367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may want something like:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;pos = prxmatch('/\d{2}\/\d{2}\/\d{2} /',x);&lt;/P&gt;&lt;P&gt;X is the name of the variable to search the string.&lt;/P&gt;&lt;P&gt;Pos here is the position that a dd\dd\dd&amp;lt;space&amp;gt; string is found in X&lt;/P&gt;&lt;P&gt;You need to have the final space as otherwise dd\dd\dddd would not be differentiated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2013 18:03:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Checking-date/m-p/85200#M24367</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2013-01-24T18:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: Checking date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Checking-date/m-p/85201#M24368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess you could hard code it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data work.have;&lt;/P&gt;&lt;P&gt;length row $100.;&lt;/P&gt;&lt;P&gt;input @1 row $Char69.;&lt;/P&gt;&lt;P&gt;if substr(row,14,1)='-'&amp;nbsp; and input(substr(row,47,8),mmddyy8.) ne . ;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ENG-112 ENGLISH COMPOSITION II..... 06/30/03 CR&amp;nbsp;&amp;nbsp; 1.5&amp;nbsp; *TE&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ENG-113 ENGLISH COMPOSITION III.... 06/30/03 CR&amp;nbsp;&amp;nbsp; 1.5&amp;nbsp; *TE&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2013 18:10:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Checking-date/m-p/85201#M24368</guid>
      <dc:creator>DBailey</dc:creator>
      <dc:date>2013-01-24T18:10:12Z</dc:date>
    </item>
    <item>
      <title>Re: Checking date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Checking-date/m-p/85202#M24369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To avoid getting messages about invalid data, you might want to replace this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,mmddyy8.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,??mmddyy8.)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2013 18:28:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Checking-date/m-p/85202#M24369</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2013-01-24T18:28:38Z</dc:date>
    </item>
    <item>
      <title>Re: Checking date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Checking-date/m-p/85203#M24370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Test this version with a line of data containing 06/10/2003 and see what happens. This was my first approach to the logic.&lt;/P&gt;&lt;P&gt;It will treat it as a valid date of 6/10/1920 (assuming your year cutoff date is the same as my default).&lt;/P&gt;&lt;P&gt;If you never have mm/dd/yyyy data no problem.&lt;/P&gt;&lt;P&gt;Also, if the date is invalid such as 02/30/03 it will also be missing. So you may need to check further.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2013 18:34:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Checking-date/m-p/85203#M24370</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2013-01-24T18:34:38Z</dc:date>
    </item>
  </channel>
</rss>

