<?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 end of month date in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/end-of-month-date/m-p/24475#M4155</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure how to classify an ID to the month end date when I have a date variable for them.&lt;/P&gt;&lt;P&gt;for example i'd like my data set to look like: where i have ID and Date and need to create FILE PERIOD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ID Date FILE_PERIOD&lt;/P&gt;&lt;P&gt;1 01Jan2012 31Jan2012&lt;/P&gt;&lt;P&gt;2 05Feb2012 29Feb2012&lt;/P&gt;&lt;P&gt;etc..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you for your help. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Mar 2012 17:25:43 GMT</pubDate>
    <dc:creator>Danglytics</dc:creator>
    <dc:date>2012-03-07T17:25:43Z</dc:date>
    <item>
      <title>end of month date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/end-of-month-date/m-p/24475#M4155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure how to classify an ID to the month end date when I have a date variable for them.&lt;/P&gt;&lt;P&gt;for example i'd like my data set to look like: where i have ID and Date and need to create FILE PERIOD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ID Date FILE_PERIOD&lt;/P&gt;&lt;P&gt;1 01Jan2012 31Jan2012&lt;/P&gt;&lt;P&gt;2 05Feb2012 29Feb2012&lt;/P&gt;&lt;P&gt;etc..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you for your help. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2012 17:25:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/end-of-month-date/m-p/24475#M4155</guid>
      <dc:creator>Danglytics</dc:creator>
      <dc:date>2012-03-07T17:25:43Z</dc:date>
    </item>
    <item>
      <title>Re: end of month date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/end-of-month-date/m-p/24476#M4156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this one:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;input id $ date :date9.;&lt;/P&gt;&lt;P&gt;format date date9.;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;1 01Jan2012&lt;/P&gt;&lt;P&gt;2 05Feb2012&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;FILE_PERIOD=intnx('month',date,0,'e');&lt;/P&gt;&lt;P&gt;format FILE_PERIOD date9.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2012 17:48:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/end-of-month-date/m-p/24476#M4156</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2012-03-07T17:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: end of month date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/end-of-month-date/m-p/24477#M4157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great thank you&amp;nbsp; that worked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to get FILE_PERIOD into a character format with the following format structure?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example the code above will give me 31Jan2012, but i'd like FILE_PERIOD to be 2012Jan31 so that it is consistent with my other formats.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2012 18:12:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/end-of-month-date/m-p/24477#M4157</guid>
      <dc:creator>Danglytics</dc:creator>
      <dc:date>2012-03-07T18:12:02Z</dc:date>
    </item>
    <item>
      <title>Re: end of month date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/end-of-month-date/m-p/24478#M4158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want ;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;_n_=intnx('month',date,0,'e');&lt;/P&gt;&lt;P&gt;FILE_PERIOD=cats(put(_n_, yymon7.),day(_n_));&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;&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit: just updated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2012 18:20:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/end-of-month-date/m-p/24478#M4158</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2012-03-07T18:20:38Z</dc:date>
    </item>
    <item>
      <title>Re: end of month date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/end-of-month-date/m-p/24479#M4159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2012 18:35:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/end-of-month-date/m-p/24479#M4159</guid>
      <dc:creator>Danglytics</dc:creator>
      <dc:date>2012-03-07T18:35:09Z</dc:date>
    </item>
  </channel>
</rss>

