<?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: Specifying year and month in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Specifying-year-and-month/m-p/519543#M140726</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/152732"&gt;@Yoko&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This looks like a simple thing to do, but I'm having a hard time to find an easy solution.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I know this works (specifying exact date):&lt;/P&gt;
&lt;P&gt;if '10Apr2008'd &amp;lt;= dob then test=1...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I want to do is to specify only year and month;&lt;/P&gt;
&lt;P&gt;Suppose I already converted dob to year/month format (dob2)...&lt;/P&gt;
&lt;P&gt;How can do (this is not a programming language) 'if 10Apr &amp;lt; dob2 then text=1?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I appreciate your suggestions.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yoko&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;How did you create dob2?&lt;/P&gt;
&lt;P&gt;You question seems to relate to month and year but the shown pseudocode is comparing dob2 to a day of month and month value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may be better off sticking with a date and use the month and year functions. You should provide some concrete examples of your dob variables, some comparisons and the desired results. We can't tell if your DOB2 might be numeric or text, formatted as a date or not and whether the reduction to dob2 should consider the beginning of the month or&amp;nbsp;the end of the month in the comparison.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I might guess that want some variation on intnx('month', dob,0,'B') (beginning of month) or &amp;nbsp;intnx('month', dob,0,'E') (end of month) instead of creating a new variable.&lt;/P&gt;</description>
    <pubDate>Fri, 07 Dec 2018 20:25:21 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2018-12-07T20:25:21Z</dc:date>
    <item>
      <title>Specifying year and month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Specifying-year-and-month/m-p/519530#M140718</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This looks like a simple thing to do, but I'm having a hard time to find an easy solution.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know this works (specifying exact date):&lt;/P&gt;&lt;P&gt;if '10Apr2008'd &amp;lt;= dob then test=1...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I want to do is to specify only year and month;&lt;/P&gt;&lt;P&gt;Suppose I already converted dob to year/month format (dob2)...&lt;/P&gt;&lt;P&gt;How can do (this is not a programming language) 'if 10Apr &amp;lt; dob2 then text=1?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appreciate your suggestions.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yoko&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Dec 2018 19:49:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Specifying-year-and-month/m-p/519530#M140718</guid>
      <dc:creator>Yoko</dc:creator>
      <dc:date>2018-12-07T19:49:45Z</dc:date>
    </item>
    <item>
      <title>Re: Specifying year and month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Specifying-year-and-month/m-p/519537#M140723</link>
      <description>&lt;P&gt;You ahve to make an assumption if you want to use only year and month. The assumption is that you use always the first day of the month, or the 15th day of the month, or the last day of the month.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Dec 2018 20:21:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Specifying-year-and-month/m-p/519537#M140723</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-12-07T20:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: Specifying year and month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Specifying-year-and-month/m-p/519542#M140725</link>
      <description>&lt;P&gt;If dob2 is a char type variable formated yymm try&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if put(dob, yymmn4.) &amp;lt;= dob2 then ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;pay attention, let date = '07DEC2018'd then&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;put(date, yymmn6.) = '201812';&amp;nbsp; /* n stands for number */&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;put(date, yymms7.) = '2018/12';&amp;nbsp; /* s stands for slash */&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Dec 2018 20:23:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Specifying-year-and-month/m-p/519542#M140725</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2018-12-07T20:23:51Z</dc:date>
    </item>
    <item>
      <title>Re: Specifying year and month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Specifying-year-and-month/m-p/519543#M140726</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/152732"&gt;@Yoko&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This looks like a simple thing to do, but I'm having a hard time to find an easy solution.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I know this works (specifying exact date):&lt;/P&gt;
&lt;P&gt;if '10Apr2008'd &amp;lt;= dob then test=1...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I want to do is to specify only year and month;&lt;/P&gt;
&lt;P&gt;Suppose I already converted dob to year/month format (dob2)...&lt;/P&gt;
&lt;P&gt;How can do (this is not a programming language) 'if 10Apr &amp;lt; dob2 then text=1?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I appreciate your suggestions.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yoko&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;How did you create dob2?&lt;/P&gt;
&lt;P&gt;You question seems to relate to month and year but the shown pseudocode is comparing dob2 to a day of month and month value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may be better off sticking with a date and use the month and year functions. You should provide some concrete examples of your dob variables, some comparisons and the desired results. We can't tell if your DOB2 might be numeric or text, formatted as a date or not and whether the reduction to dob2 should consider the beginning of the month or&amp;nbsp;the end of the month in the comparison.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I might guess that want some variation on intnx('month', dob,0,'B') (beginning of month) or &amp;nbsp;intnx('month', dob,0,'E') (end of month) instead of creating a new variable.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Dec 2018 20:25:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Specifying-year-and-month/m-p/519543#M140726</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-12-07T20:25:21Z</dc:date>
    </item>
    <item>
      <title>Re: Specifying year and month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Specifying-year-and-month/m-p/519544#M140727</link>
      <description>What is the type and format of the variable you're working with here? Can you post a small data set with the expected output?</description>
      <pubDate>Fri, 07 Dec 2018 20:26:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Specifying-year-and-month/m-p/519544#M140727</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-12-07T20:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: Specifying year and month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Specifying-year-and-month/m-p/519552#M140730</link>
      <description>&lt;P&gt;What do you mean by converted to month year? Did you convert it to character representing as mmmyy or you just applied format to see them as mmmyy format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your just applying only the format than behind the screens it still holds the date value. You can still use full date value to filter ('01jan2018'd ). Make sure you use the proper boundaries for filtering.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Dec 2018 20:46:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Specifying-year-and-month/m-p/519552#M140730</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2018-12-07T20:46:12Z</dc:date>
    </item>
  </channel>
</rss>

