<?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: Help with PROC FORMAT in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Help-with-PROC-FORMAT/m-p/602549#M16834</link>
    <description>&lt;P&gt;Thanks for responding! The variable is numeric.&lt;/P&gt;</description>
    <pubDate>Thu, 07 Nov 2019 19:02:16 GMT</pubDate>
    <dc:creator>amng</dc:creator>
    <dc:date>2019-11-07T19:02:16Z</dc:date>
    <item>
      <title>Help with PROC FORMAT</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Help-with-PROC-FORMAT/m-p/602544#M16831</link>
      <description>&lt;P&gt;Hi, I've recently downloaded a public data set for analysis, and they have some data in MMYYYY format. I would like to be able to use this data to understand the number of people that have received a service in the last 12 months. I think I need SAS to recognize the six numbers as a date, but am unsure how to do that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems like I'll have to use proc format to create a format to do that - I've scoured the other message boards, but haven't found the exact answer to my problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Help appreciated!&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2019 18:42:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Help-with-PROC-FORMAT/m-p/602544#M16831</guid>
      <dc:creator>amng</dc:creator>
      <dc:date>2019-11-07T18:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: Help with PROC FORMAT</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Help-with-PROC-FORMAT/m-p/602546#M16832</link>
      <description>&lt;P&gt;Is the variable that contains MMYYYY character or numeric?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You won't need PROC FORMAT, but I do need answer to the above question to know how to proceed.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2019 18:57:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Help-with-PROC-FORMAT/m-p/602546#M16832</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-11-07T18:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: Help with PROC FORMAT</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Help-with-PROC-FORMAT/m-p/602549#M16834</link>
      <description>&lt;P&gt;Thanks for responding! The variable is numeric.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2019 19:02:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Help-with-PROC-FORMAT/m-p/602549#M16834</guid>
      <dc:creator>amng</dc:creator>
      <dc:date>2019-11-07T19:02:16Z</dc:date>
    </item>
    <item>
      <title>Re: Help with PROC FORMAT</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Help-with-PROC-FORMAT/m-p/602553#M16835</link>
      <description>&lt;P&gt;Create a new variable that is an actual SAS date value. Then finding out how long it has been since the last service is easy mathematically.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
    set have;
    sasdate=input(put(date,6.),yymmn6.);
    format sasdate date7.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then you could subtract this date from the date of the last&amp;nbsp; service, if the number is &amp;gt; 365, then no service in the last 12 months.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2019 19:14:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Help-with-PROC-FORMAT/m-p/602553#M16835</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-11-07T19:14:18Z</dc:date>
    </item>
    <item>
      <title>Re: Help with PROC FORMAT</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Help-with-PROC-FORMAT/m-p/602582#M16842</link>
      <description>&lt;P&gt;Adding onto &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt; 's response: you can take advantage of the INTNX function for the last part to avoid any issues with leap-years, etc. Assuming today is the comparison date for "within the last 12 months" and &lt;STRONG&gt;no&lt;/STRONG&gt; future observations:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if intnx("month",sasdate,12,"s") ge today();&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;or&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if intnx("year",sasdate,1,"s") ge today();&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bringing the service date of the observation forward 12 months (or 1 year), is it greater than or equal to today's date?&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2019 20:15:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Help-with-PROC-FORMAT/m-p/602582#M16842</guid>
      <dc:creator>unison</dc:creator>
      <dc:date>2019-11-07T20:15:55Z</dc:date>
    </item>
    <item>
      <title>Re: Help with PROC FORMAT</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Help-with-PROC-FORMAT/m-p/603591#M16961</link>
      <description>&lt;P&gt;Thanks! This was really helpful.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2019 14:38:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Help-with-PROC-FORMAT/m-p/603591#M16961</guid>
      <dc:creator>amng</dc:creator>
      <dc:date>2019-11-12T14:38:44Z</dc:date>
    </item>
  </channel>
</rss>

