<?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: $ATE9. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ATE9/m-p/753472#M237481</link>
    <description>&lt;P&gt;The data is the most important part.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Removing a format is easy:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
   set have;
   format max_ApplicationDate;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;In fact that's a good idea before trying to show the data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once you have that, show a few lines of data, as well as what you would like to be in those few lines of data.&amp;nbsp; The programming will be short to create a complete fix, after you complete those steps.&lt;/P&gt;</description>
    <pubDate>Mon, 12 Jul 2021 12:18:05 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2021-07-12T12:18:05Z</dc:date>
    <item>
      <title>$ATE9.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ATE9/m-p/753452#M237468</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;I am running max of date field for each customer.&lt;/P&gt;
&lt;P&gt;The date field is a SAS date field with format date9. and informnat date9.&lt;/P&gt;
&lt;P&gt;The result of the max is a char with format&amp;nbsp;$ATE9.&lt;/P&gt;
&lt;P&gt;Can anyone explain how max of sas date resulted with char field??&lt;/P&gt;
&lt;P&gt;what is&amp;nbsp;$ATE9.&amp;nbsp; format?&lt;/P&gt;
&lt;P&gt;Hoe can I remove this format from the new field ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jul 2021 09:51:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ATE9/m-p/753452#M237468</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2021-07-12T09:51:41Z</dc:date>
    </item>
    <item>
      <title>Re: $ATE9.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ATE9/m-p/753456#M237469</link>
      <description>&lt;P&gt;SHOW US&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We need to see your code, and also a screen capture of where you see $ATE9.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jul 2021 10:10:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ATE9/m-p/753456#M237469</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-07-12T10:10:20Z</dc:date>
    </item>
    <item>
      <title>Re: $ATE9.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ATE9/m-p/753460#M237470</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ronein_0-1626084926704.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/61126i237EFF1C5B1B2044/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ronein_0-1626084926704.png" alt="Ronein_0-1626084926704.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ronein_1-1626084944088.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/61127i7ADB8BA85594367C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ronein_1-1626084944088.png" alt="Ronein_1-1626084944088.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ronein_2-1626085118102.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/61128i9722AB90D0ABD6FB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ronein_2-1626085118102.png" alt="Ronein_2-1626085118102.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jul 2021 10:18:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ATE9/m-p/753460#M237470</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2021-07-12T10:18:46Z</dc:date>
    </item>
    <item>
      <title>Re: $ATE9.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ATE9/m-p/753461#M237471</link>
      <description>&lt;P&gt;I specifically asked to see your code, as well as screen captures.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jul 2021 10:21:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ATE9/m-p/753461#M237471</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-07-12T10:21:48Z</dc:date>
    </item>
    <item>
      <title>Re: $ATE9.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ATE9/m-p/753465#M237475</link>
      <description>&lt;P&gt;No code, no data =&amp;gt; helping is impossible.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jul 2021 11:47:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ATE9/m-p/753465#M237475</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2021-07-12T11:47:32Z</dc:date>
    </item>
    <item>
      <title>Re: $ATE9.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ATE9/m-p/753467#M237477</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15475"&gt;@andreas_lds&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;No code, no data =&amp;gt; helping is impossible.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;good point, we need (a portion of) the data as well&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jul 2021 11:51:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ATE9/m-p/753467#M237477</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-07-12T11:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: $ATE9.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ATE9/m-p/753472#M237481</link>
      <description>&lt;P&gt;The data is the most important part.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Removing a format is easy:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
   set have;
   format max_ApplicationDate;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;In fact that's a good idea before trying to show the data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once you have that, show a few lines of data, as well as what you would like to be in those few lines of data.&amp;nbsp; The programming will be short to create a complete fix, after you complete those steps.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jul 2021 12:18:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ATE9/m-p/753472#M237481</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2021-07-12T12:18:05Z</dc:date>
    </item>
    <item>
      <title>Re: $ATE9.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ATE9/m-p/753480#M237486</link>
      <description>&lt;P&gt;&amp;nbsp;I am sorry but I am not allowed to put data from work here.&lt;/P&gt;
&lt;P&gt;However ,I have explained it very well and the answer can be theoretically.&lt;/P&gt;
&lt;P&gt;The source field is numeric SAS date.&lt;/P&gt;
&lt;P&gt;Then after perform max on that field&amp;nbsp; I&amp;nbsp; got char variable with format&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;$ATE9.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;May anyone explain&amp;nbsp;what is this format&amp;nbsp;&amp;nbsp;$ATE9.?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I found also that even when I take distinct values of SAS numeric date then I get char variable with format $10.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ronein_0-1626092538806.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/61129i5B120AEBCDDE94EF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ronein_0-1626092538806.png" alt="Ronein_0-1626092538806.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ronein_1-1626092557159.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/61130iA325902A5E7E8BAF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ronein_1-1626092557159.png" alt="Ronein_1-1626092557159.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
/***Here the resulted variable is char!!!*/
PROC SQL;
	create table wanted  as
	select distinct SAS_numeric_date as date	   
	from  source_data 
;
QUIT;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jul 2021 12:23:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ATE9/m-p/753480#M237486</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2021-07-12T12:23:16Z</dc:date>
    </item>
    <item>
      <title>Re: $ATE9.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ATE9/m-p/753486#M237492</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;However ,I have explained it very well and the answer can be theoretically.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;NO! You haven't shown us your code that produces this unexpected result. We can't answer why you are getting unexpected results without seeing your code.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You've shown us nothing that would cause a custom format for character variables named ATE to be used. Can you show us your entire code? Why do we have to keep asking?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If SAS says something is character, then it is character. You saying it is numeric is not relevant; SAS is right in these situations. And so, the conclusion must be that the data was never numeric.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In what you have showed us, you have a character date (not a numeric date) that produces a character variable result. If you have started with a numeric variable, you would get a numeric result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
    input date $10.; /* Date is character */
    cards;
01-01-2020
01-02-2020
01-01-2020
;
proc sql;
    create table want  as
	select distinct date as date /* Result is character */   
	from have 
;
quit;

data have2;
    input date :ddmmyy10.; /* Date is numeric */
    format date ddmmyy10.;
    cards;
01-01-2020
01-02-2020
01-01-2020
;
proc sql;
    create table want2  as
	select distinct date as date	/* Result is numeric */   
	from have2
;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jul 2021 12:44:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ATE9/m-p/753486#M237492</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-07-12T12:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: $ATE9.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ATE9/m-p/753492#M237495</link>
      <description>&lt;P&gt;So that last variable, MAX_APPLICATION_DATE, is a character variable, not a numeric variable (dates are stored as number of days).&lt;/P&gt;
&lt;P&gt;So rather than trying to attach a numeric format to display it as a date,&amp;nbsp; you will need to create a new numeric variable to contain the actual date values as a date instead of a character string.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it has strings that look like the screen shot then use the DATE informat to convert. If instead it has strings like YYYY-MM-DD you posted in a later reply then use the YYMMDD informat.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a skeleton of a SAS data step to create a copy of your dataset and create a new date variable from the existing character variable.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data WANT;
  set HAVE:
  max_date = input(max_application_date,yymmdd10.);
  format max_date date9.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jul 2021 13:00:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ATE9/m-p/753492#M237495</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-07-12T13:00:40Z</dc:date>
    </item>
    <item>
      <title>Re: $ATE9.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ATE9/m-p/753526#M237510</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159549"&gt;@Ronein&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;&lt;FONT size="6" color="#FF0000"&gt;&lt;STRONG&gt;I am running max of date field for each customer.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;And just how did you do that? Code please.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since your output is character you did not use Proc Means or Summary. So one suspects macro variables stuffed into a poorly defined variable.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jul 2021 15:21:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ATE9/m-p/753526#M237510</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-07-12T15:21:21Z</dc:date>
    </item>
  </channel>
</rss>

