Hello,
A dataset has a numeric column with values 0, 1, 2, 3.
I would like to print these numbers with a "€" prefix. so my code is
proc format ; picture Format_Year_Suite low-high = '0' (prefix='€ ') ; run;
proc print data=BEH_INDIC_7 ;
var Suite_Year_4_Sort ;
format Suite_Year_4_Sort Format_Year_Suite. ;
run ;
It works for all numbers execpt 0 which is not displayed
When you specify zero as the digit selector, any leading zeros in the number to be displayed are shown as blanks
proc format ; picture Format_Year_Suite low-high = '9' (prefix='€ ') ; run;
This should work for you
When you specify zero as the digit selector, any leading zeros in the number to be displayed are shown as blanks
proc format ; picture Format_Year_Suite low-high = '9' (prefix='€ ') ; run;
This should work for you
thanks a lot naveenraj. but whenever there are more than 10 years, 10 is diplayed N + 0 (N + 10 intended), 11 is displayed N + 1 (N + 11 intended)...
great ! thanks for your quick and reliable response
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.