BookmarkSubscribeRSS Feed
TANMOY05
Obsidian | Level 7

like i want to round the values of variables c11,c12,c13 in a dataset named final to three decimal places. how to do it?

2 REPLIES 2
ed_sas_member
Meteorite | Level 14

Hi

You can use the round() function :

C11_rounded = round(c11, .001);


Best,

PaigeMiller
Diamond | Level 26

You could use a format to round variables, rather than using the ROUND function. But it really depends on what you plan to do with these variables after the rounding or formatting. What are you going to do with the variables after the rounding or formatting?

 

format c11 c12 c13 10.3;

 

--
Paige Miller

sas-innovate-2024.png

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!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 393 views
  • 1 like
  • 3 in conversation