<?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: sort by quarter in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/sort-by-quarter/m-p/66549#M14451</link>
    <description>Masoud &lt;BR /&gt;
 &lt;BR /&gt;
what difference do you expect when sortng by (internal) sas date and sorting by quarter?&lt;BR /&gt;
 &lt;BR /&gt;
just interested&lt;BR /&gt;
Peterc</description>
    <pubDate>Mon, 23 Aug 2010 19:30:17 GMT</pubDate>
    <dc:creator>Peter_C</dc:creator>
    <dc:date>2010-08-23T19:30:17Z</dc:date>
    <item>
      <title>sort by quarter</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sort-by-quarter/m-p/66546#M14448</link>
      <description>I have data set with SAS date variable spanning several years.&lt;BR /&gt;
I want to create a variable that contains the year and the quarter (e.g 2010Q2), which can then be used to sort by.&lt;BR /&gt;
&lt;BR /&gt;
Can anyone help?&lt;BR /&gt;
&lt;BR /&gt;
Masoud</description>
      <pubDate>Mon, 23 Aug 2010 17:42:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sort-by-quarter/m-p/66546#M14448</guid>
      <dc:creator>mpajoh</dc:creator>
      <dc:date>2010-08-23T17:42:33Z</dc:date>
    </item>
    <item>
      <title>Re: sort by quarter</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sort-by-quarter/m-p/66547#M14449</link>
      <description>Hi:&lt;BR /&gt;
  Read about the various YYQ formats. For example, a SAS date value for 03/15/2006 could be used to create a character variable called QTRVAL with this code:&lt;BR /&gt;
[pre]&lt;BR /&gt;
 qtrval = put(date,yyq6.);&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                                &lt;BR /&gt;
And the resulting value would be: 2006Q1&lt;BR /&gt;
 &lt;BR /&gt;
The documentation on the various formats is here:&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/63026/HTML/default/viewer.htm#/documentation/cdl/en/lrdict/63026/HTML/default/a001263753.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/63026/HTML/default/viewer.htm#/documentation/cdl/en/lrdict/63026/HTML/default/a001263753.htm&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/63026/HTML/default/viewer.htm#/documentation/cdl/en/lrdict/63026/HTML/default/a000201247.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/63026/HTML/default/viewer.htm#/documentation/cdl/en/lrdict/63026/HTML/default/a000201247.htm&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/63026/HTML/default/viewer.htm#/documentation/cdl/en/lrdict/63026/HTML/default/a002231398.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/63026/HTML/default/viewer.htm#/documentation/cdl/en/lrdict/63026/HTML/default/a002231398.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
cynthia</description>
      <pubDate>Mon, 23 Aug 2010 18:01:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sort-by-quarter/m-p/66547#M14449</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-08-23T18:01:42Z</dc:date>
    </item>
    <item>
      <title>Re: sort by quarter</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sort-by-quarter/m-p/66548#M14450</link>
      <description>Thanks Cynthia.</description>
      <pubDate>Mon, 23 Aug 2010 19:07:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sort-by-quarter/m-p/66548#M14450</guid>
      <dc:creator>mpajoh</dc:creator>
      <dc:date>2010-08-23T19:07:06Z</dc:date>
    </item>
    <item>
      <title>Re: sort by quarter</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sort-by-quarter/m-p/66549#M14451</link>
      <description>Masoud &lt;BR /&gt;
 &lt;BR /&gt;
what difference do you expect when sortng by (internal) sas date and sorting by quarter?&lt;BR /&gt;
 &lt;BR /&gt;
just interested&lt;BR /&gt;
Peterc</description>
      <pubDate>Mon, 23 Aug 2010 19:30:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sort-by-quarter/m-p/66549#M14451</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2010-08-23T19:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: sort by quarter</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sort-by-quarter/m-p/66550#M14452</link>
      <description>With a multiple-variable BY statement, the order of observations that have date values throughout a given quarter, may get sorted differently if only considering the "formatted" value sort-sequence, presuming the BY statement has additional variables to the right of the date variable itself.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Mon, 23 Aug 2010 20:11:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sort-by-quarter/m-p/66550#M14452</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-08-23T20:11:29Z</dc:date>
    </item>
    <item>
      <title>Re: sort by quarter</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sort-by-quarter/m-p/66551#M14453</link>
      <description>I am using the quarter variable to for proc summary's class variable.&lt;BR /&gt;
&lt;BR /&gt;
Masoud</description>
      <pubDate>Tue, 24 Aug 2010 18:31:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sort-by-quarter/m-p/66551#M14453</guid>
      <dc:creator>mpajoh</dc:creator>
      <dc:date>2010-08-24T18:31:09Z</dc:date>
    </item>
    <item>
      <title>Re: sort by quarter</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sort-by-quarter/m-p/66552#M14454</link>
      <description>You can use the CLASS statement option GROUPINTERNAL to have you cake and eat it too.</description>
      <pubDate>Tue, 24 Aug 2010 18:55:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sort-by-quarter/m-p/66552#M14454</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2010-08-24T18:55:05Z</dc:date>
    </item>
    <item>
      <title>Re: sort by quarter</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sort-by-quarter/m-p/66553#M14455</link>
      <description>Thank you all.&lt;BR /&gt;
I will have to investigate and learn.&lt;BR /&gt;
&lt;BR /&gt;
Masoud</description>
      <pubDate>Wed, 25 Aug 2010 12:53:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sort-by-quarter/m-p/66553#M14455</guid>
      <dc:creator>mpajoh</dc:creator>
      <dc:date>2010-08-25T12:53:55Z</dc:date>
    </item>
  </channel>
</rss>

