Skip to main Content

Dates In Foreign Languages

Through its National Language Support (NLS) SAS supports an increasing number of languages. With each new release of SAS new formats are introduced which allow data values to be formatted in languages other than English.  NLS date format names all begin "NL" and each displays a different date format depending on the value of the LOCALE SAS system option, for example using 4 locales and 3 different NLS date formats:
 
Program: 

  %let testdate="01OCT2010"d;
 
  options locale=en_GB;

  data _null_; 
    td=&testdate;
    put "In English: " td nldate.;
  run;
 
  options locale=fr_FR;

  data _null_; 
    td=&testdate;
    put "In French: " td nldate.;
  run;

  options locale=de_DE; 

  data _null_; 
    td=&testdate;
    put "Month and Year in German: " td nldateym.;
  run;

  options locale=pt_PT; 

  data _null_; 
    td=&testdate;
    put "Month in Portuguese: " td nldatemn.;
  run;

 

These four data steps yield the following output in the SAS Log:

In English: 01 October 2010 
In French: 01 octobre 2010
Month and Year in German: Oktober 2010
Month in Portuguese: Outubro

Many other languages are available, including Afrikaans, Catalan, Macedonian, Slovenian etc.   The SAS Help for National Language Support details all available locales and NLS formats.