<?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 DECIMAL values in Amazon Athena displaying in DOLLAR format in SAS 9.4 by default in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/DECIMAL-values-in-Amazon-Athena-displaying-in-DOLLAR-format-in/m-p/895466#M39807</link>
    <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;A customer is using SAS 9.4 on-premise and connecting with CData ODBC Driver for Amazon Athena.&lt;/P&gt;&lt;P&gt;The customer is from South Korea. Including that because the locales might affect the output just in case.&lt;/P&gt;&lt;P&gt;I'm using SAS Viya free trial for testing purposes since SAS 9.4 doesnt have any free trial from what I've searched.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The customer has 2 problems:&lt;/P&gt;&lt;P&gt;1) DATE values in Athena such as :&lt;/P&gt;&lt;P&gt;2020-10-11 show in SAS as 11OCT2020&lt;/P&gt;&lt;P&gt;YYYY-MM-DD format shows in SAS as DDMMMYY.&lt;/P&gt;&lt;P&gt;For this, I believe this DDMMMYY is the default date format in SAS. However, I want to be able to make the YYMMDD format by default whenever I get data from this driver, such as anytime I connect these DATE values show in YYMMDD format in SAS. How can I do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) DECIMAL values in Athena, such as &lt;STRONG&gt;42000000.00, 30099090.00,&amp;nbsp;395929&lt;/STRONG&gt;&amp;nbsp;show as DOLLAR format in SAS. I read in SAS documentation that the default format for numeric values is &lt;STRONG&gt;BEST&lt;/STRONG&gt; format. I havent made any changes in my SAS. Why is DOLLAR showing as default? Could it be a driver problem? And most importantly, how can I make the &lt;STRONG&gt;BEST&lt;/STRONG&gt; format my permanent default format for decimal values?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've seen some solutions researching but they mostly include formatting the columns in my query in the .sas program, so each time you run it it changes the format. However, I want to make it by default so I don't need to do all these extra steps in my code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please help me?&lt;/P&gt;&lt;P&gt;If you need any additional details, feel free to ask me.&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;</description>
    <pubDate>Fri, 22 Sep 2023 16:22:16 GMT</pubDate>
    <dc:creator>Test87</dc:creator>
    <dc:date>2023-09-22T16:22:16Z</dc:date>
    <item>
      <title>DECIMAL values in Amazon Athena displaying in DOLLAR format in SAS 9.4 by default</title>
      <link>https://communities.sas.com/t5/New-SAS-User/DECIMAL-values-in-Amazon-Athena-displaying-in-DOLLAR-format-in/m-p/895466#M39807</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;A customer is using SAS 9.4 on-premise and connecting with CData ODBC Driver for Amazon Athena.&lt;/P&gt;&lt;P&gt;The customer is from South Korea. Including that because the locales might affect the output just in case.&lt;/P&gt;&lt;P&gt;I'm using SAS Viya free trial for testing purposes since SAS 9.4 doesnt have any free trial from what I've searched.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The customer has 2 problems:&lt;/P&gt;&lt;P&gt;1) DATE values in Athena such as :&lt;/P&gt;&lt;P&gt;2020-10-11 show in SAS as 11OCT2020&lt;/P&gt;&lt;P&gt;YYYY-MM-DD format shows in SAS as DDMMMYY.&lt;/P&gt;&lt;P&gt;For this, I believe this DDMMMYY is the default date format in SAS. However, I want to be able to make the YYMMDD format by default whenever I get data from this driver, such as anytime I connect these DATE values show in YYMMDD format in SAS. How can I do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) DECIMAL values in Athena, such as &lt;STRONG&gt;42000000.00, 30099090.00,&amp;nbsp;395929&lt;/STRONG&gt;&amp;nbsp;show as DOLLAR format in SAS. I read in SAS documentation that the default format for numeric values is &lt;STRONG&gt;BEST&lt;/STRONG&gt; format. I havent made any changes in my SAS. Why is DOLLAR showing as default? Could it be a driver problem? And most importantly, how can I make the &lt;STRONG&gt;BEST&lt;/STRONG&gt; format my permanent default format for decimal values?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've seen some solutions researching but they mostly include formatting the columns in my query in the .sas program, so each time you run it it changes the format. However, I want to make it by default so I don't need to do all these extra steps in my code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please help me?&lt;/P&gt;&lt;P&gt;If you need any additional details, feel free to ask me.&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2023 16:22:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/DECIMAL-values-in-Amazon-Athena-displaying-in-DOLLAR-format-in/m-p/895466#M39807</guid>
      <dc:creator>Test87</dc:creator>
      <dc:date>2023-09-22T16:22:16Z</dc:date>
    </item>
    <item>
      <title>Re: DECIMAL values in Amazon Athena displaying in DOLLAR format in SAS 9.4 by default</title>
      <link>https://communities.sas.com/t5/New-SAS-User/DECIMAL-values-in-Amazon-Athena-displaying-in-DOLLAR-format-in/m-p/895515#M39810</link>
      <description>&lt;P&gt;It shouldn't really matter how the values are DISPLAYED as long as the right values are stored.&lt;/P&gt;
&lt;P&gt;Just issue a FORMAT statement to change to a different format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To display date value in YYYY-MM-DD style then use the YYMMDD10. format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BEST is probably NOT the right format to use for a value that was DECIMAL in the database.&amp;nbsp; That can only have a FIXED number of decimal digits.&amp;nbsp; So use the normal numeric format instead.&amp;nbsp; So if original variable (field/column) could store 8 digital to the left of the decimal place and two to the right then use then 11.2 format.&amp;nbsp; You can use the F alias for the normal numeric format if you want to remind yourself that it is fixed length.&amp;nbsp; &amp;nbsp;If the values could be negative with the same magnitude you will need to add one to the total width to account for the leading dash character to indicate a negative value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  set athena.mydata;
  format mydate yymmdd10.  mydecimal F12.2 ;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 23 Sep 2023 00:45:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/DECIMAL-values-in-Amazon-Athena-displaying-in-DOLLAR-format-in/m-p/895515#M39810</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-09-23T00:45:09Z</dc:date>
    </item>
    <item>
      <title>Re: DECIMAL values in Amazon Athena displaying in DOLLAR format in SAS 9.4 by default</title>
      <link>https://communities.sas.com/t5/New-SAS-User/DECIMAL-values-in-Amazon-Athena-displaying-in-DOLLAR-format-in/m-p/895631#M39829</link>
      <description>&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;P&gt;Your solution definitely works when executing a .sas program. However, my question still persists:&lt;/P&gt;&lt;P&gt;Is there any global setting to change the default formatting for Date and Decimal types?&lt;/P&gt;&lt;P&gt;Is there a way where in any part of my SAS tool if I run a program the default format will be numeric for decimals, and YYYY-MM-DD for DATE, even if I dont include the format statement in my code?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to be able to configure it once and change the default format just like you can change locales or datestyle.&lt;/P&gt;&lt;P&gt;Is there any way to do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2023 09:24:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/DECIMAL-values-in-Amazon-Athena-displaying-in-DOLLAR-format-in/m-p/895631#M39829</guid>
      <dc:creator>Test87</dc:creator>
      <dc:date>2023-09-25T09:24:18Z</dc:date>
    </item>
  </channel>
</rss>

