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
Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.
Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.
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.
Ready to level-up your skills? Choose your own adventure.