<?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: Selection of quarters in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Selection-of-quarters/m-p/212544#M52492</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;things that might help&lt;/P&gt;&lt;P&gt;yyq function &lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000199346.htm"&gt;http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000199346.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;yyqN. format &lt;A class="active_link" href="http://support.sas.com/documentation/cdl/en/leforinforref/63324/HTML/default/viewer.htm#p024gsdcagozdnn1se1nqs4rnwjl.htm"&gt;http://support.sas.com/documentation/cdl/en/leforinforref/63324/HTML/default/viewer.htm#p024gsdcagozdnn1se1nqs4rnwjl.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;INTNX function &lt;A class="active_link" href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000212700.htm"&gt;http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000212700.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;because I'm not sure I understand the request&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 May 2015 14:55:00 GMT</pubDate>
    <dc:creator>Peter_C</dc:creator>
    <dc:date>2015-05-11T14:55:00Z</dc:date>
    <item>
      <title>Selection of quarters</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Selection-of-quarters/m-p/212542#M52490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello together,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've a question based on SAS date and time interval about selection of quarters via pattern:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I try to select the the quarters from year 2014 until current quarter (20152). The output is some thing like that:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;20142&lt;/P&gt;&lt;P&gt;20143&lt;/P&gt;&lt;P&gt;20144&lt;/P&gt;&lt;P&gt;20151&lt;/P&gt;&lt;P&gt;20152&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I understood the SAS function 'YYQ' the return value is like YYQ or YYYYQ. Because the saved format of quarters is YYYYQ in my table is, I tried the following syntaxs without success:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attempt 1: WHERE T1.V_quarter_date &amp;gt;= yyq(year(date()))-1,qtr(date()));&lt;/P&gt;&lt;P&gt;Attempt 2: WHERE T1.V_quarter_date &amp;gt;= (yyq(year(date))-1,intnx('Q',today(),0,'S'));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The another possibility was in my opinion as follows: &lt;/P&gt;&lt;P&gt;WHERE T1.V_quarter_date &amp;gt;= (input( ((year(date))-1) || intnx('Q',today(),0,'S')),best5.);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //converting char to num&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is wronge in my syntax?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 May 2015 11:27:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Selection-of-quarters/m-p/212542#M52490</guid>
      <dc:creator>SAS_NUBI2015</dc:creator>
      <dc:date>2015-05-10T11:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: Selection of quarters</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Selection-of-quarters/m-p/212543#M52491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can &lt;STRONG&gt;not&lt;/STRONG&gt; use yyq() in that way if &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;V_quarter_date&amp;nbsp; is a DATE type variable.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;WHERE T1.V_quarter_date between '01JAN2014'd and '28FEB2015'd&amp;nbsp; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 May 2015 14:40:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Selection-of-quarters/m-p/212543#M52491</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2015-05-11T14:40:51Z</dc:date>
    </item>
    <item>
      <title>Re: Selection of quarters</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Selection-of-quarters/m-p/212544#M52492</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;things that might help&lt;/P&gt;&lt;P&gt;yyq function &lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000199346.htm"&gt;http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000199346.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;yyqN. format &lt;A class="active_link" href="http://support.sas.com/documentation/cdl/en/leforinforref/63324/HTML/default/viewer.htm#p024gsdcagozdnn1se1nqs4rnwjl.htm"&gt;http://support.sas.com/documentation/cdl/en/leforinforref/63324/HTML/default/viewer.htm#p024gsdcagozdnn1se1nqs4rnwjl.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;INTNX function &lt;A class="active_link" href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000212700.htm"&gt;http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000212700.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;because I'm not sure I understand the request&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 May 2015 14:55:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Selection-of-quarters/m-p/212544#M52492</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2015-05-11T14:55:00Z</dc:date>
    </item>
    <item>
      <title>Re: Selection of quarters</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Selection-of-quarters/m-p/212545#M52493</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello together,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the right solution ist:&lt;/P&gt;&lt;P&gt;where&amp;nbsp; &lt;/P&gt;&lt;P&gt;T1.V_quarter_date &amp;gt;= (input( put((intnx('Q',today(),-1,'beginning')),yyqn5.),5.); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanx again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 May 2015 14:58:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Selection-of-quarters/m-p/212545#M52493</guid>
      <dc:creator>SAS_NUBI2015</dc:creator>
      <dc:date>2015-05-11T14:58:17Z</dc:date>
    </item>
  </channel>
</rss>

