Hi,
I have numeric variable that are formated like the following:
format Montant 20.;
What is the proper way to format this variable so that thousands are separated with a space?
Just curious: where is that used? There are a couple of formats that separate thousands with either periods or commas.
It is used by french canadian.
Won't claim this is proper but seems to work for me:
proc format library=work;
picture mysep
0 - 9999999 = '000 000 000.00' (decsep='.' dig3sep=' ') ;
run;
data _null_;
x= 123456;
put x= mysep.;
run;
This is handled by the SAS National Language Support routines. Your locale should be "French_Canada".
Give this a try:
options locale=French_Canada;
data _null_;
Montant=123456789;
format Montant nlnum20.2;
put Montant;
run;
Works Great! Thank you very much.
Quick question, can I put at the very top of my code and it will be used in each data procedure?
You could always just put it in either your config or autoexec file. That way it will be used every time you run SAS.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.