<?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: Format date in proc tabulate using proc format in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Format-date-in-proc-tabulate-using-proc-format/m-p/70919#M8118</link>
    <description>THANK YOU CYNTHIA. Your suggestion worked. Many thanks again.</description>
    <pubDate>Fri, 23 Jan 2009 12:31:12 GMT</pubDate>
    <dc:creator>Karo_22</dc:creator>
    <dc:date>2009-01-23T12:31:12Z</dc:date>
    <item>
      <title>Format date in proc tabulate using proc format</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Format-date-in-proc-tabulate-using-proc-format/m-p/70917#M8116</link>
      <description>Hi All, trying to find possible solution to my issue. Any assistance would be appreciated. &lt;BR /&gt;
I have check_dt that is in format mmyy7. (JAN2009,DEC2008, NOV2008 etc) . However, there is also possibility of having check_dt=SEP9999 (month9999 year).&lt;BR /&gt;
If that is the case, if check_dt has year(check_dt)=9999 then I want to have new_check_dt=n/a, otherwise new_check_dt=check_dt.&lt;BR /&gt;
That changes from date format to character if done in data step. So, I thought I could do something like this&lt;BR /&gt;
%let lowdate = '31DEC2008'd;&lt;BR /&gt;
%let highdate = '01JAN2009'd;&lt;BR /&gt;
 &lt;BR /&gt;
proc format;&lt;BR /&gt;
value nadate  low-&amp;amp;lowdate = [monyy7.]&lt;BR /&gt;
              &amp;amp;highdate-high = ' N/A';&lt;BR /&gt;
run;&lt;BR /&gt;
Then....in proc tabulate steps...are something like this&lt;BR /&gt;
class&lt;BR /&gt;
classlev&lt;BR /&gt;
var&lt;BR /&gt;
table check_dt='Check Date'*f=nadate.&lt;BR /&gt;
&lt;BR /&gt;
But formatting my check_dt to above proc format...is not doing anything to my output! Can anyone help? Thanks.</description>
      <pubDate>Thu, 22 Jan 2009 18:15:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Format-date-in-proc-tabulate-using-proc-format/m-p/70917#M8116</guid>
      <dc:creator>Karo_22</dc:creator>
      <dc:date>2009-01-22T18:15:00Z</dc:date>
    </item>
    <item>
      <title>Re: Format date in proc tabulate using proc format</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Format-date-in-proc-tabulate-using-proc-format/m-p/70918#M8117</link>
      <description>Hi:&lt;BR /&gt;
  Assuming that check_dt is a CLASS variable, try moving the format out of the TABLE statement and into a FORMAT statement:&lt;BR /&gt;
[pre]&lt;BR /&gt;
format check_dt nadate.; [/pre]&lt;BR /&gt;
                                                                                 &lt;BR /&gt;
  When you apply the format in the TABLE statement -- you are applying it to the calculated statistics -- the ones that result from the various crossings -- not to the CLASS variables themselves.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Fri, 23 Jan 2009 03:31:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Format-date-in-proc-tabulate-using-proc-format/m-p/70918#M8117</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2009-01-23T03:31:14Z</dc:date>
    </item>
    <item>
      <title>Re: Format date in proc tabulate using proc format</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Format-date-in-proc-tabulate-using-proc-format/m-p/70919#M8118</link>
      <description>THANK YOU CYNTHIA. Your suggestion worked. Many thanks again.</description>
      <pubDate>Fri, 23 Jan 2009 12:31:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Format-date-in-proc-tabulate-using-proc-format/m-p/70919#M8118</guid>
      <dc:creator>Karo_22</dc:creator>
      <dc:date>2009-01-23T12:31:12Z</dc:date>
    </item>
    <item>
      <title>Re: Format date in proc tabulate using proc format</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Format-date-in-proc-tabulate-using-proc-format/m-p/70920#M8119</link>
      <description>One last question. Currently I have, proc sort by  descending CHECK_Dt &amp;amp; then proc tabulate steps. My output has following pattern from top to bottom for the check_dt: n/a, Jan2009, Dec2008,Nov2008 &amp;amp; so on down to back 3 years. Is there a way to have my n/a rows to be moved to the bottom of this column, but KEEP my true dates in descending order? So it would be: Jan2009, Dec2008,Nov2008 .....n/a&lt;BR /&gt;
Thanks</description>
      <pubDate>Fri, 23 Jan 2009 13:01:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Format-date-in-proc-tabulate-using-proc-format/m-p/70920#M8119</guid>
      <dc:creator>Karo_22</dc:creator>
      <dc:date>2009-01-23T13:01:28Z</dc:date>
    </item>
    <item>
      <title>Re: Format date in proc tabulate using proc format</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Format-date-in-proc-tabulate-using-proc-format/m-p/70921#M8120</link>
      <description>I would change year = 9999 to missing then use MISSING DESCENDING on class statement.&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
data test;&lt;BR /&gt;
   input id:$2. date:monyy.;&lt;BR /&gt;
   if year(date) eq 9999 then date = .;&lt;BR /&gt;
   format date monyy.;&lt;BR /&gt;
   cards;&lt;BR /&gt;
01 sep9999&lt;BR /&gt;
01 nov2008&lt;BR /&gt;
02 sep2008&lt;BR /&gt;
02 sep2007&lt;BR /&gt;
;;;;&lt;BR /&gt;
   run;&lt;BR /&gt;
proc print;&lt;BR /&gt;
   run;&lt;BR /&gt;
proc format;&lt;BR /&gt;
   value nadate . = 'N/A' other = [monyy7.];&lt;BR /&gt;
   run;&lt;BR /&gt;
proc tabulate;&lt;BR /&gt;
   class date / missing descending;&lt;BR /&gt;
   tables date,all;&lt;BR /&gt;
   format date nadate.;&lt;BR /&gt;
   run;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Fri, 23 Jan 2009 13:36:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Format-date-in-proc-tabulate-using-proc-format/m-p/70921#M8120</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2009-01-23T13:36:13Z</dc:date>
    </item>
    <item>
      <title>Re: Format date in proc tabulate using proc format</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Format-date-in-proc-tabulate-using-proc-format/m-p/70922#M8121</link>
      <description>thank you!!!! Your suggestion worked well on my project. Greatly appreciated.</description>
      <pubDate>Fri, 23 Jan 2009 14:32:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Format-date-in-proc-tabulate-using-proc-format/m-p/70922#M8121</guid>
      <dc:creator>Karo_22</dc:creator>
      <dc:date>2009-01-23T14:32:23Z</dc:date>
    </item>
  </channel>
</rss>

