<?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: Formatting a data element when using CATS in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Formatting-a-data-element-when-using-CATS/m-p/506713#M1388</link>
    <description>Yeah, this is a common gotcha. SAS will convert numeric using the BEST format which puts it in as a number, not the date. You need to use PUT() to convert it to the format desired as shown in BallardW code.</description>
    <pubDate>Tue, 23 Oct 2018 00:41:34 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-10-23T00:41:34Z</dc:date>
    <item>
      <title>Formatting a data element when using CATS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Formatting-a-data-element-when-using-CATS/m-p/506704#M1384</link>
      <description>&lt;P&gt;I'm trying to concatenate 4 data elements together to create a unique ID, the last data element is a date. When I use&amp;nbsp;the CATS function, it is converting the date into the numeric equivalent and that's not what I want. I want the actual date&amp;nbsp;&lt;/P&gt;&lt;P&gt;cats(a.agreement_type,a.customer_number,a.trade_number,a.maturity_date). What do I need to do for the date?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 22 Oct 2018 23:16:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Formatting-a-data-element-when-using-CATS/m-p/506704#M1384</guid>
      <dc:creator>titanbob</dc:creator>
      <dc:date>2018-10-22T23:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting a data element when using CATS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Formatting-a-data-element-when-using-CATS/m-p/506706#M1385</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/48113"&gt;@titanbob&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I'm trying to concatenate 4 data elements together to create a unique ID, the last data element is a date. When I use&amp;nbsp;the CATS function, it is converting the date into the numeric equivalent and that's not what I want. I want the actual date&amp;nbsp;&lt;/P&gt;
&lt;P&gt;cats(a.agreement_type,a.customer_number,a.trade_number,a.maturity_date). What do I need to do for the date?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Possibly something like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;cats(a.agreement_type,a.customer_number,a.trade_number, put(a.maturity_date, date9.) ).&lt;/P&gt;
&lt;P&gt;if you want the date to appear like 20OCT2018 if the value is an actual SAS date value. Pick the format you want in place of date9 .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Oct 2018 23:23:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Formatting-a-data-element-when-using-CATS/m-p/506706#M1385</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-10-22T23:23:14Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting a data element when using CATS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Formatting-a-data-element-when-using-CATS/m-p/506713#M1388</link>
      <description>Yeah, this is a common gotcha. SAS will convert numeric using the BEST format which puts it in as a number, not the date. You need to use PUT() to convert it to the format desired as shown in BallardW code.</description>
      <pubDate>Tue, 23 Oct 2018 00:41:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Formatting-a-data-element-when-using-CATS/m-p/506713#M1388</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-10-23T00:41:34Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting a data element when using CATS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Formatting-a-data-element-when-using-CATS/m-p/506845#M1409</link>
      <description>&lt;P&gt;Thanks for the help, really appreciate it!!!&lt;/P&gt;</description>
      <pubDate>Tue, 23 Oct 2018 14:45:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Formatting-a-data-element-when-using-CATS/m-p/506845#M1409</guid>
      <dc:creator>titanbob</dc:creator>
      <dc:date>2018-10-23T14:45:23Z</dc:date>
    </item>
  </channel>
</rss>

