The SAS Output Delivery System and reporting techniques

Trailing Zeros with ROUND()

Accepted Solution Solved
Reply
Regular Contributor
Posts: 237
Accepted Solution

Trailing Zeros with ROUND()

I am using the ROUND() function.  Is there a way to get SAS to display the trailing zeros to the specified number of decimals?  For example, if I were to use ROUND(var,.01) and the value of var is 10.999, then I would hope to see 11.00 rather than just 11.


Accepted Solutions
Solution
‎05-10-2013 10:46 AM
Super User
Posts: 11,343

Re: Trailing Zeros with ROUND()

Posted in reply to djbateman

Associate a format such a f12.2 with the variable.

View solution in original post


All Replies
Solution
‎05-10-2013 10:46 AM
Super User
Posts: 11,343

Re: Trailing Zeros with ROUND()

Posted in reply to djbateman

Associate a format such a f12.2 with the variable.

Regular Contributor
Posts: 237

Re: Trailing Zeros with ROUND()

Thank you so much!  I was trying to use the zw.d format with no luck.  I was not aware of the fw.d format.  Thank you for introducing me to it.

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 4849 views
  • 1 like
  • 2 in conversation