<?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: How to check the date format in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-check-the-date-format/m-p/180980#M303029</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The most flexible tool to achieve this is pattern matching :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Data One;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;format Bday yymmn6.;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;input BdayTxt $ ;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if prxmatch("/^[12]\d{3}[01]\d$/o", trim(bDayTxt)) then Bday = input(BdayTxt, yymmn6.);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;cards;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;201401&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;201402&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;20140312&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc print data=one; run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Jun 2014 17:53:01 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2014-06-02T17:53:01Z</dc:date>
    <item>
      <title>How to check the date format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-check-the-date-format/m-p/180979#M303028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a Data set, it contains date column .My requirement is if the date values is not in the&amp;nbsp; given format i just want to reject the record.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data One;&lt;/P&gt;&lt;P&gt;informat Bday yyyymmn6.;&lt;/P&gt;&lt;P&gt;format Bday yyyymmn6.;&lt;/P&gt;&lt;P&gt;input Bday yyyymmn6.;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;201401&lt;/P&gt;&lt;P&gt;201402&lt;/P&gt;&lt;P&gt;20140312&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I dont want the third record because it is not in given format and i want to capture in another table, for this is there any functions whether the date value is in particular format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So can any one have idea on above case.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jun 2014 17:30:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-check-the-date-format/m-p/180979#M303028</guid>
      <dc:creator>SonyTrinesh</dc:creator>
      <dc:date>2014-06-02T17:30:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to check the date format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-check-the-date-format/m-p/180980#M303029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The most flexible tool to achieve this is pattern matching :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Data One;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;format Bday yymmn6.;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;input BdayTxt $ ;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if prxmatch("/^[12]\d{3}[01]\d$/o", trim(bDayTxt)) then Bday = input(BdayTxt, yymmn6.);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;cards;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;201401&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;201402&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;20140312&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc print data=one; run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jun 2014 17:53:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-check-the-date-format/m-p/180980#M303029</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2014-06-02T17:53:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to check the date format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-check-the-date-format/m-p/180981#M303030</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data One;&lt;/P&gt;&lt;P&gt;input@;&lt;/P&gt;&lt;P&gt;if length(_infile_)^=6 then delete;&lt;/P&gt;&lt;P&gt;input Bday ;&lt;/P&gt;&lt;P&gt;informat Bday yymmn6.;&lt;/P&gt;&lt;P&gt;format Bday yymmn6.;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;201401&lt;/P&gt;&lt;P&gt;201402&lt;/P&gt;&lt;P&gt;20140312&lt;/P&gt;&lt;P&gt;201406&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc print;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jun 2014 19:03:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-check-the-date-format/m-p/180981#M303030</guid>
      <dc:creator>slchen</dc:creator>
      <dc:date>2014-06-02T19:03:55Z</dc:date>
    </item>
  </channel>
</rss>

