<?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: Change the format of numeric value in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Change-the-format-of-numeric-value/m-p/706005#M216648</link>
    <description>Thank you very much!&lt;BR /&gt;Could I do that with modify statement in proc sql? I need to modify the existing format column in the table.</description>
    <pubDate>Tue, 15 Dec 2020 12:37:35 GMT</pubDate>
    <dc:creator>SASdevAnneMarie</dc:creator>
    <dc:date>2020-12-15T12:37:35Z</dc:date>
    <item>
      <title>Change the format of numeric value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Change-the-format-of-numeric-value/m-p/706001#M216646</link>
      <description>&lt;P&gt;Hello Experts,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a numeric value with comma&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-0,165530135449&lt;/P&gt;
&lt;P&gt;I would like to have this value with a point:&amp;nbsp;-0.165530135449&lt;/P&gt;
&lt;P style="line-height: 1.71429;"&gt;Could you advise me the format please, the best32. doesn't work.&lt;/P&gt;
&lt;P style="line-height: 1.71429;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 12:20:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Change-the-format-of-numeric-value/m-p/706001#M216646</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2020-12-15T12:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: Change the format of numeric value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Change-the-format-of-numeric-value/m-p/706003#M216647</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  x = -0.165530135449;

  put x= bestx32.15;
  put x= best32.15;
  put x= comma32.15;
  put x= commax32.15;
run;


data _null_;
input x commax32.;


  put x= bestx32.15;
  put x= best32.15;
  put x= comma32.15;
  put x= commax32.15;


cards;
-0,165530135449
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 15 Dec 2020 12:26:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Change-the-format-of-numeric-value/m-p/706003#M216647</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2020-12-15T12:26:55Z</dc:date>
    </item>
    <item>
      <title>Re: Change the format of numeric value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Change-the-format-of-numeric-value/m-p/706005#M216648</link>
      <description>Thank you very much!&lt;BR /&gt;Could I do that with modify statement in proc sql? I need to modify the existing format column in the table.</description>
      <pubDate>Tue, 15 Dec 2020 12:37:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Change-the-format-of-numeric-value/m-p/706005#M216648</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2020-12-15T12:37:35Z</dc:date>
    </item>
    <item>
      <title>Re: Change the format of numeric value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Change-the-format-of-numeric-value/m-p/706006#M216649</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  x = -0.165530135449;
  format x datetime.; /* wrong format */ 
run;
proc print data = have;
run;

proc sql;
  alter table have
    modify x format=commax32.15 /* new format */
  ;
quit;
proc print data = have;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;B-)&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 12:43:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Change-the-format-of-numeric-value/m-p/706006#M216649</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2020-12-15T12:43:51Z</dc:date>
    </item>
    <item>
      <title>Re: Change the format of numeric value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Change-the-format-of-numeric-value/m-p/706007#M216650</link>
      <description>It replaces the comma by point?</description>
      <pubDate>Tue, 15 Dec 2020 12:51:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Change-the-format-of-numeric-value/m-p/706007#M216650</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2020-12-15T12:51:06Z</dc:date>
    </item>
    <item>
      <title>Re: Change the format of numeric value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Change-the-format-of-numeric-value/m-p/706009#M216651</link>
      <description>&lt;P&gt;what do you mean by "it"?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 12:56:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Change-the-format-of-numeric-value/m-p/706009#M216651</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2020-12-15T12:56:31Z</dc:date>
    </item>
    <item>
      <title>Re: Change the format of numeric value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Change-the-format-of-numeric-value/m-p/706021#M216660</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/286185"&gt;@SASdevAnneMarie&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;It replaces the comma by point?&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Formats change the appearance of the number for the benefit of humans looking at the number; the underlying numeric value is unchanged. I don't think the word "replaces" applies here.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 13:50:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Change-the-format-of-numeric-value/m-p/706021#M216660</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-12-15T13:50:10Z</dc:date>
    </item>
    <item>
      <title>Re: Change the format of numeric value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Change-the-format-of-numeric-value/m-p/706062#M216677</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/286185"&gt;@SASdevAnneMarie&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello Experts,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a numeric value with comma&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-0,165530135449&lt;/P&gt;
&lt;P&gt;I would like to have this value with a point:&amp;nbsp;-0.165530135449&lt;/P&gt;
&lt;P style="line-height: 1.71429;"&gt;Could you advise me the format please, the best32. doesn't work.&lt;/P&gt;
&lt;P style="line-height: 1.71429;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If you have a numeric variable and it is display the decimal marker as a comma instead of a period then you have either attached a format that asks to display that way (BESTX, COMMAX, NLNUM) or the SAS session is running with language settings that tells SAS you are in a part of the world where comma is the normal character to use.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Check what format is attached to the variable. For example by running PROC CONTENTS on the dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use the &lt;A href="https://documentation.sas.com/?cdcId=vdmmlcdc&amp;amp;cdcVersion=8.1&amp;amp;docsetId=leforinforref&amp;amp;docsetTarget=p1sunvzyp4dw9nn1paddq0gmnhwa.htm&amp;amp;locale=en" target="_self"&gt;NLNUMI&lt;/A&gt; format to force SAS to display the values with period for the decimal place and comma as the thousands separators no matter what the language settings are..&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 17:20:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Change-the-format-of-numeric-value/m-p/706062#M216677</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-12-15T17:20:10Z</dc:date>
    </item>
    <item>
      <title>Re: Change the format of numeric value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Change-the-format-of-numeric-value/m-p/706066#M216680</link>
      <description>Yes, it works, beacause after I can export the file with period.</description>
      <pubDate>Tue, 15 Dec 2020 17:53:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Change-the-format-of-numeric-value/m-p/706066#M216680</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2020-12-15T17:53:29Z</dc:date>
    </item>
    <item>
      <title>Re: Change the format of numeric value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Change-the-format-of-numeric-value/m-p/706067#M216681</link>
      <description>The format commax32.15 &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Tue, 15 Dec 2020 17:54:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Change-the-format-of-numeric-value/m-p/706067#M216681</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2020-12-15T17:54:00Z</dc:date>
    </item>
  </channel>
</rss>

