Home > Net >  Set the language argument of the proc format to SAS
Set the language argument of the proc format to SAS

Time:02-02

I'm trying to get today's date from the system in a certain format, for example 2022Febrero01, for this I have used the following proc format, the problem is that this code returns the first letter of the month in lowercase, and I need it in capital letters, I have seen that passing LANGUAGE = Spain as an argument (in my case) I would put the F in capital letters, but it gives me a syntax error and I can't find it anywhere, could someone be so kind as to lend me a hand please? I would be enormously grateful.

proc format; 
  picture dtfmt (default=25)
    other = '%B%Y
' (datatype=date)
    language = Spanish
  ;
run;


%let date= %sysfunc(date(), dtfmt.);

%put &date.;

It returns to me 2022febrero01 and i want 2022Febrero01

CodePudding user response:

Put this before your code

options locale = English_UnitedStates;
  •  Tags:  
  • Related