<?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: Descending Character Months in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Descending-Character-Months/m-p/241267#M44697</link>
    <description>&lt;P&gt;This is one of the many reasons when using date, datetime or time in analysis to strongly consider making SAS date, datetime or time valued variables instead of leaving the individual components (month day year hour minute second) as separate variables of often mixed type (month=&amp;gt; character, day year =&amp;gt; numeric).&lt;/P&gt;
&lt;P&gt;Then choosing an appropriated date display format, or making a custom one, makes the output pretty.&lt;/P&gt;</description>
    <pubDate>Wed, 30 Dec 2015 18:55:28 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2015-12-30T18:55:28Z</dc:date>
    <item>
      <title>Descending Character Months</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Descending-Character-Months/m-p/241171#M44660</link>
      <description>&lt;DIV&gt;&lt;STRONG&gt;Given the SAS data set WORK.TEMPS:&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;IMG src="http://www.sas-exam.com/files/sas-exam.com/files/user514/Q96-1.png" border="0" alt="" /&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;The following program is submitted:&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="rteindent1"&gt;proc sort data=WORK.TEMPS:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; by descending Month Day;&lt;BR /&gt;run;&lt;/DIV&gt;&lt;DIV class="rteindent1"&gt;&lt;BR /&gt;proc print data=WORK.TEMPS:&lt;BR /&gt;run;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;What is the output?&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&lt;IMG src="http://www.sas-exam.com/files/sas-exam.com/files/user514/Q96-Ans.png" border="0" alt="" /&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;Answer: C&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Why? How is C even sorted in descending order? I was thinking it would be A, since July comes after May.&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 29 Dec 2015 22:12:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Descending-Character-Months/m-p/241171#M44660</guid>
      <dc:creator>Durlov</dc:creator>
      <dc:date>2015-12-29T22:12:45Z</dc:date>
    </item>
    <item>
      <title>Re: Descending Character Months</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Descending-Character-Months/m-p/241174#M44662</link>
      <description>&lt;P&gt;C is correct.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The months are character, so alphabetical order (corresponding to ascending MONTH) would be:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;July&lt;/P&gt;
&lt;P&gt;June&lt;/P&gt;
&lt;P&gt;May&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Descending month would give you:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;May&amp;nbsp;&lt;/P&gt;
&lt;P&gt;June&lt;/P&gt;
&lt;P&gt;July&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Within each month, the observations are sorted by ascending DAY (descending only applies to one variable). &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Dec 2015 14:59:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Descending-Character-Months/m-p/241174#M44662</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2015-12-30T14:59:19Z</dc:date>
    </item>
    <item>
      <title>Re: Descending Character Months</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Descending-Character-Months/m-p/241226#M44690</link>
      <description>Oh, I didn't actually think the descending would be applied to the characters themselves (thought it was the order of the dates). Makes sense though. Thanks!</description>
      <pubDate>Wed, 30 Dec 2015 15:31:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Descending-Character-Months/m-p/241226#M44690</guid>
      <dc:creator>Durlov</dc:creator>
      <dc:date>2015-12-30T15:31:04Z</dc:date>
    </item>
    <item>
      <title>Re: Descending Character Months</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Descending-Character-Months/m-p/241267#M44697</link>
      <description>&lt;P&gt;This is one of the many reasons when using date, datetime or time in analysis to strongly consider making SAS date, datetime or time valued variables instead of leaving the individual components (month day year hour minute second) as separate variables of often mixed type (month=&amp;gt; character, day year =&amp;gt; numeric).&lt;/P&gt;
&lt;P&gt;Then choosing an appropriated date display format, or making a custom one, makes the output pretty.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Dec 2015 18:55:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Descending-Character-Months/m-p/241267#M44697</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-12-30T18:55:28Z</dc:date>
    </item>
  </channel>
</rss>

