BookmarkSubscribeRSS Feed
Fluorite | Level 6

Syntax to Print Nett Sales (Monetary format) as a numeric format? 

Country        Nett Sales

Africa             $250

Asia               $300

Australia        $350

Super User

If your values are currently of numeric type with a format such as Dollarw.d assigned then if you want the value without currency symbols you could use a format such as Fw.d, to display values without commas or currency, or Commaw.d to display values without currency symbol but including commas, or even something like BEST12. which would do the best job of fitting the values into 12 characters without currency symbols or commas.


IF your Nett Sales variable is currently a character variable then you need to convert it to numeric which would be done in a data step by creating a new variable with and input statement such as


data want;

    set have;

    nett_numeric = input(nett_sales,comma15.);





Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.


Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 3 in conversation