<?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 Format 3 decimal places in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Format-3-decimal-places/m-p/532822#M146033</link>
    <description>&lt;P&gt;I'm trying to format these values with 3 decimal places but I keep getting the leading zeroes in front of the decimal place&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm using the following code&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE style="background-color: #ffffff; border: 0px; font-family: Consolas, 'Lucida Console', Courier, Monaco, monospace; padding: 0px; top: 0px; left: -1000px; margin: 0px; white-space: pre; font-size: 16px; color: #020202; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; position: fixed;"&gt;format AVG 9.3;&lt;BR /&gt;format SLG 6.3;&lt;BR /&gt;format OBP 9.2;&lt;BR /&gt;format ISO 6.3;&lt;/PRE&gt;
&lt;P&gt;format AVG 9.3;&lt;BR /&gt;format SLG 6.3;&lt;BR /&gt;format OBP 9.3;&lt;BR /&gt;format ISO 6.3;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE style="background-color: #ffffff; border: 0px; font-family: Consolas, 'Lucida Console', Courier, Monaco, monospace; padding: 0px; top: 0px; left: -1000px; margin: 0px; white-space: pre; font-size: 16px; color: #020202; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; position: fixed;"&gt;format AVG 9.3;&lt;BR /&gt;format SLG 6.3;&lt;/PRE&gt;
&lt;PRE style="background-color: #ffffff; border: 0px; font-family: Consolas, 'Lucida Console', Courier, Monaco, monospace; padding: 0px; top: 0px; left: -1000px; margin: 0px; white-space: pre; font-size: 16px; color: #020202; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; position: fixed;"&gt;format AVG 9.3;&lt;BR /&gt;format SLG 6.3;&lt;/PRE&gt;
&lt;PRE style="background-color: #ffffff; border: 0px; font-family: Consolas, 'Lucida Console', Courier, Monaco, monospace; padding: 0px; top: 0px; left: -1000px; margin: 0px; white-space: pre; font-size: 16px; color: #020202; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; position: fixed;"&gt;format AVG 9.3;&lt;BR /&gt;format SLG 6.3;&lt;/PRE&gt;
&lt;PRE style="background-color: #ffffff; border: 0px; font-family: Consolas, 'Lucida Console', Courier, Monaco, monospace; padding: 0px; top: 0px; left: -1000px; margin: 0px; white-space: pre; font-size: 16px; color: #020202; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; position: fixed;"&gt;format OBP 9.2&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;I have attached the Excel output from SAS, please take a look at the AVG, SLG,&amp;nbsp; OBP and ISO columns O, P,Q and R on the attached spreadsheet and advise&lt;/P&gt;</description>
    <pubDate>Tue, 05 Feb 2019 01:41:30 GMT</pubDate>
    <dc:creator>philjones820</dc:creator>
    <dc:date>2019-02-05T01:41:30Z</dc:date>
    <item>
      <title>Format 3 decimal places</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format-3-decimal-places/m-p/532822#M146033</link>
      <description>&lt;P&gt;I'm trying to format these values with 3 decimal places but I keep getting the leading zeroes in front of the decimal place&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm using the following code&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE style="background-color: #ffffff; border: 0px; font-family: Consolas, 'Lucida Console', Courier, Monaco, monospace; padding: 0px; top: 0px; left: -1000px; margin: 0px; white-space: pre; font-size: 16px; color: #020202; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; position: fixed;"&gt;format AVG 9.3;&lt;BR /&gt;format SLG 6.3;&lt;BR /&gt;format OBP 9.2;&lt;BR /&gt;format ISO 6.3;&lt;/PRE&gt;
&lt;P&gt;format AVG 9.3;&lt;BR /&gt;format SLG 6.3;&lt;BR /&gt;format OBP 9.3;&lt;BR /&gt;format ISO 6.3;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE style="background-color: #ffffff; border: 0px; font-family: Consolas, 'Lucida Console', Courier, Monaco, monospace; padding: 0px; top: 0px; left: -1000px; margin: 0px; white-space: pre; font-size: 16px; color: #020202; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; position: fixed;"&gt;format AVG 9.3;&lt;BR /&gt;format SLG 6.3;&lt;/PRE&gt;
&lt;PRE style="background-color: #ffffff; border: 0px; font-family: Consolas, 'Lucida Console', Courier, Monaco, monospace; padding: 0px; top: 0px; left: -1000px; margin: 0px; white-space: pre; font-size: 16px; color: #020202; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; position: fixed;"&gt;format AVG 9.3;&lt;BR /&gt;format SLG 6.3;&lt;/PRE&gt;
&lt;PRE style="background-color: #ffffff; border: 0px; font-family: Consolas, 'Lucida Console', Courier, Monaco, monospace; padding: 0px; top: 0px; left: -1000px; margin: 0px; white-space: pre; font-size: 16px; color: #020202; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; position: fixed;"&gt;format AVG 9.3;&lt;BR /&gt;format SLG 6.3;&lt;/PRE&gt;
&lt;PRE style="background-color: #ffffff; border: 0px; font-family: Consolas, 'Lucida Console', Courier, Monaco, monospace; padding: 0px; top: 0px; left: -1000px; margin: 0px; white-space: pre; font-size: 16px; color: #020202; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; position: fixed;"&gt;format OBP 9.2&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;I have attached the Excel output from SAS, please take a look at the AVG, SLG,&amp;nbsp; OBP and ISO columns O, P,Q and R on the attached spreadsheet and advise&lt;/P&gt;</description>
      <pubDate>Tue, 05 Feb 2019 01:41:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format-3-decimal-places/m-p/532822#M146033</guid>
      <dc:creator>philjones820</dc:creator>
      <dc:date>2019-02-05T01:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: Format 3 decimal places</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format-3-decimal-places/m-p/532824#M146035</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/29388"&gt;@philjones820&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;I'm trying to format these values with 3 decimal places&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;OK&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but I keep getting the leading zeroes in front of the decimal place&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;Why do you think the leading zero to the left of the decimal point has anything to do with the 3 decimal places to the right of the decimal point?&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you be ***sure*** your data you want to display without a leading zero is &amp;lt; 1?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What would you expect/desire to display in the below example?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
   a=0.123456789;
   b=a;
   c=a;
   output;

   a=123.123456789;
   b=a;
   c=a;
   output;

   a=123456.123456789;
   b=a;
   c=a;
   output;

   format a best. b 9.3 c 4.3;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Feb 2019 02:12:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format-3-decimal-places/m-p/532824#M146035</guid>
      <dc:creator>ScottBass</dc:creator>
      <dc:date>2019-02-05T02:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: Format 3 decimal places</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format-3-decimal-places/m-p/532830#M146036</link>
      <description>Also, be sure to look at your output in SAS and not just in Excel. Excel is notorious for NOT respecting SAS formats. So depending on how you are sending your output to Excel -- data/PROC EXPORT or report/ODS -- Excel may or may not use the SAS format you want.&lt;BR /&gt;Cynthia</description>
      <pubDate>Tue, 05 Feb 2019 03:06:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format-3-decimal-places/m-p/532830#M146036</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2019-02-05T03:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: Format 3 decimal places</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format-3-decimal-places/m-p/533106#M146124</link>
      <description>&lt;P&gt;The Excel is output is fine now&lt;/P&gt;
&lt;P&gt;have a number 0.573 that I need to format with 3 decimal places in SAS and I though format 9.3 would do that, I don't know if it is supposed to give me 3 decimal places after the 0 like it is now or if I need to remove the 0?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Feb 2019 23:12:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format-3-decimal-places/m-p/533106#M146124</guid>
      <dc:creator>philjones820</dc:creator>
      <dc:date>2019-02-05T23:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: Format 3 decimal places</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format-3-decimal-places/m-p/533144#M146134</link>
      <description>&lt;P&gt;See &lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000199377.htm" target="_self"&gt;http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000199377.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The 9.3 format will display the number right aligned in a 9 character width field with 3 decimal places to the right of the decimal point.&amp;nbsp; It will display the integer portion to the left of the decimal point.&amp;nbsp; If your data is &amp;lt; 1 there will be a zero for the integer portion.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IMO suppressing the leading zero in this scenario would be confusing.&amp;nbsp; I've never had need to do so.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2019 06:07:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format-3-decimal-places/m-p/533144#M146134</guid>
      <dc:creator>ScottBass</dc:creator>
      <dc:date>2019-02-06T06:07:28Z</dc:date>
    </item>
    <item>
      <title>Re: Format 3 decimal places</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format-3-decimal-places/m-p/533424#M146247</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/29388"&gt;@philjones820&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;The Excel is output is fine now&lt;/P&gt;
&lt;P&gt;have a number 0.573 that I need to format with 3 decimal places in SAS and I though format 9.3 would do that, I don't know if it is supposed to give me 3 decimal places after the 0 like it is now or if I need to remove the 0?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It may help to show us what you expect the final result to actually look like. You will likely run into an EXCEL display issue. You need to create a custom display in Excel to no show the leading zero if you want to see .573 instead of 0.573.&lt;/P&gt;
&lt;P&gt;Highlight the cell(s) in Excel, right click an select "Format Cells", go down and highlight the Custom entry. On the right where it says &lt;U&gt;T&lt;/U&gt;ype enter .000 and hit enter.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You don't mention or show how you are sending data to Excel from SAS. If using report procedure like Proc Print or Report you may be able to use the tagattr style option for the appropriate cell(s).&lt;/P&gt;
&lt;P&gt;But if you do have values like 1223.456 that appear in the same&amp;nbsp; column that is likely going to be a challenge to suppress the 0 for other cells in the column.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2019 22:13:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format-3-decimal-places/m-p/533424#M146247</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-02-06T22:13:51Z</dc:date>
    </item>
    <item>
      <title>Re: Format 3 decimal places</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format-3-decimal-places/m-p/533510#M146280</link>
      <description>&lt;P&gt;Sigh...I thought the Excel output was just a convenience to show the data.&amp;nbsp; If he's trying to format the data *in* Excel then that's a whole different kettle of fish.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;frustration&amp;gt;&lt;/P&gt;&lt;P&gt;I sure wish folks would invest as much time in asking a question as they expect us in answering them.&lt;/P&gt;&lt;P&gt;&amp;lt;/frustration&amp;gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2019 05:16:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format-3-decimal-places/m-p/533510#M146280</guid>
      <dc:creator>ScottBass</dc:creator>
      <dc:date>2019-02-07T05:16:51Z</dc:date>
    </item>
    <item>
      <title>Re: Format 3 decimal places</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format-3-decimal-places/m-p/533585#M146312</link>
      <description>Sorry to confuse you, that was not my intention. The assignment asked for a 3 decimal place format in SAS. I was just using Excel for comparison not formatting. Thanks for your help, will try to invest more time in putting the questions together in the future &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 07 Feb 2019 14:12:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format-3-decimal-places/m-p/533585#M146312</guid>
      <dc:creator>philjones820</dc:creator>
      <dc:date>2019-02-07T14:12:59Z</dc:date>
    </item>
  </channel>
</rss>

