<?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: quarter dates in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/quarter-dates/m-p/88370#M25220</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A minor tweak on my previous code should do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let mydate = "25Nov2011"d&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;format date date9.;&lt;/P&gt;&lt;P&gt;retain date 0;&lt;/P&gt;&lt;P&gt;do _n_=0 by 1 while (date &amp;lt;= intnx('qtr',today(),-1,'s'));&lt;/P&gt;&lt;P&gt;date=ifn(weekday(&amp;amp;mydate)=5, &amp;amp;mydate, intnx('week.7',intnx('month',&amp;amp;mydate,3*_n_,'e'),-1,'e'));&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc print;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good Luck!&lt;/P&gt;&lt;P&gt;Haikuo &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Apr 2012 19:26:47 GMT</pubDate>
    <dc:creator>Haikuo</dc:creator>
    <dc:date>2012-04-18T19:26:47Z</dc:date>
    <item>
      <title>quarter dates</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/quarter-dates/m-p/88364#M25214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi,&lt;/P&gt;&lt;P&gt;I am looking to populate a dataset with the next quarters upto todays date, the quarter date populated should be the last Friday of that quarter&lt;/P&gt;&lt;P&gt;%let mydate = "25Mar2011"d&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Output&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;date&lt;/P&gt;&lt;P&gt;25 Mar 2011&lt;/P&gt;&lt;P&gt;24 Jun 2011&lt;/P&gt;&lt;P&gt;30 Dec 2011&lt;/P&gt;&lt;P&gt;30 Mar 2012&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for all your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2012 17:54:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/quarter-dates/m-p/88364#M25214</guid>
      <dc:creator>hdg</dc:creator>
      <dc:date>2012-04-18T17:54:07Z</dc:date>
    </item>
    <item>
      <title>Re: quarter dates</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/quarter-dates/m-p/88365#M25215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this one, the functions are simple, but looks complicated when being nested:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let mydate = "25Mar2011"d&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;format date date9.;&lt;/P&gt;&lt;P&gt;retain date 0;&lt;/P&gt;&lt;P&gt;do _n_=0 by 1 while (date &amp;lt;= intnx('qtr',today(),-1,'s'));&lt;/P&gt;&lt;P&gt;date=ifn(weekday(&amp;amp;mydate)=5, &amp;amp;mydate, intnx('week.7',intnx('qtr',&amp;amp;mydate,_n_,'e'),-1,'e'));&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc print;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2012 18:25:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/quarter-dates/m-p/88365#M25215</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2012-04-18T18:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: quarter dates</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/quarter-dates/m-p/88366#M25216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think it can be done with just one INTNX.&amp;nbsp; I find the last day of interval and then find the Friday by incrementing the interval by 0 using a shifted WEEK interval.&amp;nbsp; Of course the functions could be nested into one statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-size: 10pt; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt; &lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;_null_&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;&amp;nbsp; s=&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10pt; font-family: 'Courier New';"&gt;"25Mar2011"d&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;do&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; i=&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10pt; font-family: 'Courier New';"&gt;0&lt;/STRONG&gt; &lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;by&lt;/SPAN&gt; &lt;STRONG style="color: teal; background: white; font-size: 10pt; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; q = intnx(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: purple; font-family: 'Courier New';"&gt;'qtr'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;,s,i,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: purple; font-family: 'Courier New';"&gt;'e'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; f = intnx(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: purple; font-family: 'Courier New';"&gt;'week.6'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;,q,&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10pt; font-family: 'Courier New';"&gt;0&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;); &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: green; font-family: 'Courier New';"&gt;*last Friday of quarter;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; f gt today() &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;then&lt;/SPAN&gt; &lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;leave&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;put&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; (q f) (&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: teal; font-family: 'Courier New';"&gt;weekdate.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; +&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10pt; font-family: 'Courier New';"&gt;3&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;STRONG style="color: navy; background: white; font-size: 10pt; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2012 18:32:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/quarter-dates/m-p/88366#M25216</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2012-04-18T18:32:24Z</dc:date>
    </item>
    <item>
      <title>Re: quarter dates</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/quarter-dates/m-p/88367#M25217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry for not being more clear in my example,&amp;nbsp; the quarter should depend on your starting date. I have been getting confused with the qrtr/intnx command. Since it should not just be calendar year quarters.&lt;/P&gt;&lt;P&gt;So say Feb 2012&lt;/P&gt;&lt;P&gt;would be May 2012&lt;/P&gt;&lt;P&gt;etc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2012 18:42:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/quarter-dates/m-p/88367#M25217</guid>
      <dc:creator>hdg</dc:creator>
      <dc:date>2012-04-18T18:42:03Z</dc:date>
    </item>
    <item>
      <title>Re: quarter dates</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/quarter-dates/m-p/88368#M25218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually what you have just said makes me confused. You need to define the start and end day of each quarter. say for 05Feb2012, is 1feb2012 being the start day and 31may2012 being the end day or 05feb2012 being the start day and 05may2012 being the end day?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Haikuo &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2012 19:00:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/quarter-dates/m-p/88368#M25218</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2012-04-18T19:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: quarter dates</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/quarter-dates/m-p/88369#M25219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry Haikuo and thanks for all your help! Maybe a worked example will make it more clear&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let mydate = "25Nov2011"d -- this is last friday of november&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Output dataset alldates&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;date&lt;/P&gt;&lt;P&gt;25Nov2011&lt;/P&gt;&lt;P&gt;24Feb2012&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another example ie previous one&lt;/P&gt;&lt;P&gt;%let mydate = "25Mar2011"d&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Output dataset alldates&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;date&lt;/P&gt;&lt;P&gt;25 Mar 2011&lt;/P&gt;&lt;P&gt;24 Jun 2011&lt;/P&gt;&lt;P&gt;30 Dec 2011&lt;/P&gt;&lt;P&gt;30 Mar 2012&lt;/P&gt;&lt;P&gt;%let mydate =&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2012 19:15:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/quarter-dates/m-p/88369#M25219</guid>
      <dc:creator>hdg</dc:creator>
      <dc:date>2012-04-18T19:15:57Z</dc:date>
    </item>
    <item>
      <title>Re: quarter dates</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/quarter-dates/m-p/88370#M25220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A minor tweak on my previous code should do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let mydate = "25Nov2011"d&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;format date date9.;&lt;/P&gt;&lt;P&gt;retain date 0;&lt;/P&gt;&lt;P&gt;do _n_=0 by 1 while (date &amp;lt;= intnx('qtr',today(),-1,'s'));&lt;/P&gt;&lt;P&gt;date=ifn(weekday(&amp;amp;mydate)=5, &amp;amp;mydate, intnx('week.7',intnx('month',&amp;amp;mydate,3*_n_,'e'),-1,'e'));&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc print;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good Luck!&lt;/P&gt;&lt;P&gt;Haikuo &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2012 19:26:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/quarter-dates/m-p/88370#M25220</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2012-04-18T19:26:47Z</dc:date>
    </item>
    <item>
      <title>Re: quarter dates</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/quarter-dates/m-p/88371#M25221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 12pt;"&gt;%let&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt; mydate = "25mar2011"d;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 12pt; background: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt; want;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 12pt;"&gt;format&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt; date &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: teal; font-size: 12pt;"&gt;date9.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 12pt;"&gt;retain&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt; date &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 12pt; background: white; font-family: 'Courier New';"&gt;0&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 12pt;"&gt;do&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt; _n_=&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 12pt; background: white; font-family: 'Courier New';"&gt;0&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 12pt;"&gt;by&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-size: 12pt; background: white; font-family: 'Courier New';"&gt;3&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 12pt;"&gt;while&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt; (date &amp;lt;= intnx(&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: purple; font-size: 12pt;"&gt;'qtr'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt;,today(),-&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 12pt; background: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: purple; font-size: 12pt;"&gt;'s'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt;));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt;date=intnx(&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: purple; font-size: 12pt;"&gt;'month'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt;,&amp;amp;mydate,_n_,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: purple; font-size: 12pt;"&gt;'e'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt;week= intnx(&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: purple; font-size: 12pt;"&gt;'week.6'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt;, date,&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 12pt; background: white; font-family: 'Courier New';"&gt;0&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 12pt;"&gt;format&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt; week &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: teal; font-size: 12pt;"&gt;date9.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 12pt;"&gt;output&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 12pt;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 12pt; background: white; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; font-size: 12pt; background: white; font-family: 'Courier New';"&gt;print&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt;;&lt;/SPAN&gt;&lt;STRONG style="color: navy; font-size: 12pt; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2012 19:39:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/quarter-dates/m-p/88371#M25221</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2012-04-18T19:39:58Z</dc:date>
    </item>
    <item>
      <title>Re: quarter dates</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/quarter-dates/m-p/88372#M25222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;%let mydate = "25nov2011"d;
data want(keep=date);
date=&amp;amp;mydate;output; 
&amp;nbsp;&amp;nbsp; do until(_d gt "20apr2012"d);
&amp;nbsp;&amp;nbsp;&amp;nbsp; _d = intnx('month',date,3,'e'); 
&amp;nbsp;&amp;nbsp;&amp;nbsp; date = intnx('week.6',_d,0,'b'); *last Friday of quarter;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if date le "20apr2012"d then output;
&amp;nbsp;&amp;nbsp; end;
format date date9.;
run;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2012 04:26:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/quarter-dates/m-p/88372#M25222</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-04-19T04:26:12Z</dc:date>
    </item>
  </channel>
</rss>

