<?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 How do I specify a currency format and a comma format in a DATA step? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-specify-a-currency-format-and-a-comma-format-in-a-DATA/m-p/80230#M256594</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi There,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got two numeric variables in a dataset, one to hold a interger (whole) number, and another to hold a currency value in GBP (sterling pounds: £) without any decimal values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The dataset has been imported from Excel and I already did some code in a few DATA steps to rename some of the field names and add some nice labels.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;However I can't find a way to properly format these two numeric fields I have mentioned.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; font-size: 10pt;"&gt;There is also a calculated field that I have created with with has a massively long decimal digits, and I would like to give it a &lt;/SPAN&gt;format&lt;SPAN style="line-height: 1.5em; font-size: 10pt;"&gt; of currency with the £ sign and only two decimal places.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Could somebody please advise?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;P.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 19 Jan 2013 17:48:21 GMT</pubDate>
    <dc:creator>pmdci</dc:creator>
    <dc:date>2013-01-19T17:48:21Z</dc:date>
    <item>
      <title>How do I specify a currency format and a comma format in a DATA step?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-specify-a-currency-format-and-a-comma-format-in-a-DATA/m-p/80230#M256594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi There,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got two numeric variables in a dataset, one to hold a interger (whole) number, and another to hold a currency value in GBP (sterling pounds: £) without any decimal values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The dataset has been imported from Excel and I already did some code in a few DATA steps to rename some of the field names and add some nice labels.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;However I can't find a way to properly format these two numeric fields I have mentioned.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; font-size: 10pt;"&gt;There is also a calculated field that I have created with with has a massively long decimal digits, and I would like to give it a &lt;/SPAN&gt;format&lt;SPAN style="line-height: 1.5em; font-size: 10pt;"&gt; of currency with the £ sign and only two decimal places.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Could somebody please advise?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;P.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Jan 2013 17:48:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-specify-a-currency-format-and-a-comma-format-in-a-DATA/m-p/80230#M256594</guid>
      <dc:creator>pmdci</dc:creator>
      <dc:date>2013-01-19T17:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: How do I specify a currency format and a comma format in a DATA step?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-specify-a-currency-format-and-a-comma-format-in-a-DATA/m-p/80231#M256595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It would help if you provide some sample data, the code you have tried, and the result you want to achieve.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Jan 2013 20:11:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-specify-a-currency-format-and-a-comma-format-in-a-DATA/m-p/80231#M256595</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2013-01-19T20:11:28Z</dc:date>
    </item>
    <item>
      <title>Re: How do I specify a currency format and a comma format in a DATA step?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-specify-a-currency-format-and-a-comma-format-in-a-DATA/m-p/80232#M256596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are the examples:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The currency field looks like: 1672349&lt;/LI&gt;&lt;LI&gt;The integer field looks like: 94594&lt;/LI&gt;&lt;LI&gt;The calculated field I created looks like: 17.67922912658308&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found out the formats and how to do it in the end, and what I applied is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;NLMNLGBP. to the currency field, which formatted it as £1,672,349&lt;/LI&gt;&lt;LI&gt;COMMA. to the integer field, which formatted it as 94,594&lt;/LI&gt;&lt;LI&gt;NLMNLGBP. to the calculated field, which formatted it as £17.68&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;P.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 Jan 2013 10:51:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-specify-a-currency-format-and-a-comma-format-in-a-DATA/m-p/80232#M256596</guid>
      <dc:creator>pmdci</dc:creator>
      <dc:date>2013-01-20T10:51:12Z</dc:date>
    </item>
  </channel>
</rss>

