<?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: Two digit month help in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Two-digit-month-help/m-p/235074#M43032</link>
    <description>&lt;P&gt;Thank you!&lt;/P&gt;
&lt;P&gt;For some reason I can never wrap my head around the formatting. I even performed a PROC CONTENTS against the file and looked at that.&lt;/P&gt;</description>
    <pubDate>Tue, 17 Nov 2015 17:22:24 GMT</pubDate>
    <dc:creator>G_I_Jeff</dc:creator>
    <dc:date>2015-11-17T17:22:24Z</dc:date>
    <item>
      <title>Two digit month help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Two-digit-month-help/m-p/235056#M43027</link>
      <description>&lt;P&gt;I have a comma delimited file that the first 4 bytes are MMDD. I'm trying to accomplish the following:&lt;/P&gt;
&lt;PRE&gt;DATA COM01;
 INFILE INPT;
  INPUT @01 MONTH   2.
        @03 DAY     2.
        @06 HOUR    2.
        @10 APPLID  $8.
        @55 RESP    11.3;
  PMONTH = INTNX('MONTH', TODAY(), -1);
  FORMAT PMONTH MONTH2.;
  IF MONTH = PMONTH;
  KEEP MONTH DAY HOUR APPLID RESP;
RUN;&lt;/PRE&gt;
&lt;P&gt;Yet I get 0 rows selected. If I print out the results I see both months equal the same value. I'm not sure what is wrong. I've played with some formatting but that hasn't gotten me the results I expect.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2015 16:17:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Two-digit-month-help/m-p/235056#M43027</guid>
      <dc:creator>G_I_Jeff</dc:creator>
      <dc:date>2015-11-17T16:17:01Z</dc:date>
    </item>
    <item>
      <title>Re: Two digit month help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Two-digit-month-help/m-p/235067#M43031</link>
      <description>&lt;P&gt;PMONTH is a SAS Date value. The fact that you have applied a SAS format to it is irrelevant here, that only changes the way the value of PMONTH is displayed, it does not change the fact that the actual value of PMONTH is a SAS date value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;MONTH is an integer 1 through 12.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, they will never match. A SAS date value will not match an integer 1 through 12 (* — unless the actual date is Jan 1, 1960 through Jan 12,1960 and I don't think we are talking about those dates)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Perhaps you want&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if month=month(pmonth);&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2015 17:19:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Two-digit-month-help/m-p/235067#M43031</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2015-11-17T17:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: Two digit month help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Two-digit-month-help/m-p/235074#M43032</link>
      <description>&lt;P&gt;Thank you!&lt;/P&gt;
&lt;P&gt;For some reason I can never wrap my head around the formatting. I even performed a PROC CONTENTS against the file and looked at that.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2015 17:22:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Two-digit-month-help/m-p/235074#M43032</guid>
      <dc:creator>G_I_Jeff</dc:creator>
      <dc:date>2015-11-17T17:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: Two digit month help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Two-digit-month-help/m-p/235116#M43040</link>
      <description>&lt;P&gt;When performing a comparison of two values, don't use formats, don't look at formats, ignore the formats. The only thing that will be compared are the unformatted values.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2015 19:12:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Two-digit-month-help/m-p/235116#M43040</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2015-11-17T19:12:59Z</dc:date>
    </item>
  </channel>
</rss>

