<?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: End of Month function in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/End-of-Month-function/m-p/194394#M36558</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That syntax isnt working for me. Perhaps there is something going on with my data that i need to figure out.&amp;nbsp; as a workaround, Is there a way to only return the month and the year?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Mar 2015 19:00:35 GMT</pubDate>
    <dc:creator>thomask23</dc:creator>
    <dc:date>2015-03-04T19:00:35Z</dc:date>
    <item>
      <title>End of Month function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/End-of-Month-function/m-p/194392#M36556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to create a end of month field using a current date field.&amp;nbsp; The assignment date field has mutliple dates based on the actual assignment date.&amp;nbsp; For charting purposes i need to have only one date that corresponds to each month.&amp;nbsp; I have tried the below, however it does not populate anything.&amp;nbsp; Please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THE ASSIGNMENT DATA TYEP IS DATE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080; font-size: 12pt; font-family: Courier New;"&gt;Data work.Data;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set work.Data ; &lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lastDay=intnx('month',AssignmentDte,0,'E');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #000080; font-size: 12pt; font-family: Courier New;"&gt;RUN&lt;/STRONG&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #000080; font-size: 12pt; font-family: Courier New;"&gt;QUIT&lt;/STRONG&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Mar 2015 18:06:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/End-of-Month-function/m-p/194392#M36556</guid>
      <dc:creator>thomask23</dc:creator>
      <dc:date>2015-03-04T18:06:35Z</dc:date>
    </item>
    <item>
      <title>Re: End of Month function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/End-of-Month-function/m-p/194393#M36557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Apparently your variable is a character variable. need to transform into a date variable.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Data t_a;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lastDay1=intnx('month',today(),0,'E');&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a1 = 20000;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lastDay2=intnx('month',a1,0,'E');&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a2 = '20140415';&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lastDay3=intnx('month',input(a2, yymmdd8.),0,'E');&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; format lastday1 lastday2 lastday3 date9.;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;RUN; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;dataset t_a gives:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;==========================================================&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; lastDay1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lastDay2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lastDay3&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;31MAR2015&amp;nbsp;&amp;nbsp;&amp;nbsp; 20000&amp;nbsp;&amp;nbsp;&amp;nbsp; 31OCT2014&amp;nbsp;&amp;nbsp;&amp;nbsp; 20140415&amp;nbsp;&amp;nbsp;&amp;nbsp; 30APR2014&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;==========================================================&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Mar 2015 18:28:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/End-of-Month-function/m-p/194393#M36557</guid>
      <dc:creator>billfish</dc:creator>
      <dc:date>2015-03-04T18:28:42Z</dc:date>
    </item>
    <item>
      <title>Re: End of Month function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/End-of-Month-function/m-p/194394#M36558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That syntax isnt working for me. Perhaps there is something going on with my data that i need to figure out.&amp;nbsp; as a workaround, Is there a way to only return the month and the year?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Mar 2015 19:00:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/End-of-Month-function/m-p/194394#M36558</guid>
      <dc:creator>thomask23</dc:creator>
      <dc:date>2015-03-04T19:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: End of Month function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/End-of-Month-function/m-p/194395#M36559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Format the variable.&lt;/P&gt;&lt;P&gt;Also, if you're learning to program don't make the name in the DATA statement be the same as the name in the SET statement. This will overwrite your original data set and make it hard to find/debug code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will need to recreate the 'data' dataset before you can go ahead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'Courier New'; color: #000080;"&gt;Data Data2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set work.Data ; &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lastDay=intnx('month',AssignmentDte,0,'E');&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; format lastDay yearmon7.;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG style="font-style: inherit; font-size: 12pt; font-family: 'Courier New'; color: #000080;"&gt;RUN&lt;/STRONG&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'Courier New';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Mar 2015 19:36:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/End-of-Month-function/m-p/194395#M36559</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-03-04T19:36:34Z</dc:date>
    </item>
    <item>
      <title>Re: End of Month function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/End-of-Month-function/m-p/194396#M36560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What does your log show when you run your original code?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Mar 2015 19:37:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/End-of-Month-function/m-p/194396#M36560</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2015-03-04T19:37:08Z</dc:date>
    </item>
    <item>
      <title>Re: End of Month function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/End-of-Month-function/m-p/194397#M36561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-size: 12pt; font-family: Courier New;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: Invalid argument to function INTNX at line 21 column 15.&lt;/P&gt;&lt;P&gt;ASSIGNMENTDTE=07JAN2014:00:00:00.000000&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Mar 2015 20:17:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/End-of-Month-function/m-p/194397#M36561</guid>
      <dc:creator>thomask23</dc:creator>
      <dc:date>2015-03-04T20:17:41Z</dc:date>
    </item>
    <item>
      <title>Re: End of Month function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/End-of-Month-function/m-p/194398#M36562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12pt; font-family: 'Courier New'; color: #000080;"&gt;Data work.want;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set work.Data ; &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lastDay=intnx('month',datepart(AssignmentDte),0,'E');&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-size: 12pt; font-family: 'Courier New'; color: #000080;"&gt;RUN&lt;/STRONG&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12pt; font-family: 'Courier New';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Mar 2015 20:50:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/End-of-Month-function/m-p/194398#M36562</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2015-03-04T20:50:43Z</dc:date>
    </item>
    <item>
      <title>Re: End of Month function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/End-of-Month-function/m-p/194399#M36563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;or if you want to stay with datetime values:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12pt; font-family: 'Courier New'; color: #000080;"&gt;Data work.want;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set work.Data ; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; attrib lastDay datetime20.;&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lastDay=intnx('dtmonth',AssignmentDte,0,'E');&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'Courier New'; color: #000080;"&gt;&lt;STRONG&gt;RUN&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12pt; font-family: 'Courier New';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;For reporting purposes just use a different format for lastDay with prints the internal SAS datetime value in the way you want it to.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Mar 2015 21:57:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/End-of-Month-function/m-p/194399#M36563</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2015-03-04T21:57:46Z</dc:date>
    </item>
  </channel>
</rss>

