<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Change a date variable to Swedish in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Change-a-date-variable-to-Swedish/m-p/549512#M152491</link>
    <description>&lt;P&gt;I have the following code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let date=31MAR2019;

data _null_;
date_var="&amp;amp;date."d;
format date_var date9.;
month_name=put(date_var, monname.);
call symputx('month_name',month_name);
run;&lt;BR /&gt;
%put &amp;amp;month_name;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This generates the the month name &lt;STRONG&gt;March&lt;/STRONG&gt;. But I want the month name in Swedish, which is &lt;STRONG&gt;Mars&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyone knows how to do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 09 Apr 2019 08:13:30 GMT</pubDate>
    <dc:creator>rhapsody</dc:creator>
    <dc:date>2019-04-09T08:13:30Z</dc:date>
    <item>
      <title>Change a date variable to Swedish</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Change-a-date-variable-to-Swedish/m-p/549512#M152491</link>
      <description>&lt;P&gt;I have the following code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let date=31MAR2019;

data _null_;
date_var="&amp;amp;date."d;
format date_var date9.;
month_name=put(date_var, monname.);
call symputx('month_name',month_name);
run;&lt;BR /&gt;
%put &amp;amp;month_name;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This generates the the month name &lt;STRONG&gt;March&lt;/STRONG&gt;. But I want the month name in Swedish, which is &lt;STRONG&gt;Mars&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyone knows how to do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Apr 2019 08:13:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Change-a-date-variable-to-Swedish/m-p/549512#M152491</guid>
      <dc:creator>rhapsody</dc:creator>
      <dc:date>2019-04-09T08:13:30Z</dc:date>
    </item>
    <item>
      <title>Re: Change a date variable to Swedish</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Change-a-date-variable-to-Swedish/m-p/549514#M152492</link>
      <description>&lt;P&gt;This link for the EURDFMNw. format should help: &lt;A href="https://documentation.sas.com/?docsetId=nlsref&amp;amp;docsetTarget=p145pxsliwoaogn146kcyceye2q2.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank" rel="noopener"&gt;https://documentation.sas.com/?docsetId=nlsref&amp;amp;docsetTarget=p145pxsliwoaogn146kcyceye2q2.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The documentation suggests swapping out the first 3 letters for the language you want namely: SWEDFMNw.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Apr 2019 08:27:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Change-a-date-variable-to-Swedish/m-p/549514#M152492</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2019-04-09T08:27:18Z</dc:date>
    </item>
    <item>
      <title>Re: Change a date variable to Swedish</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Change-a-date-variable-to-Swedish/m-p/549516#M152494</link>
      <description>&lt;P&gt;SAS provides NLS-capable format equivalents for the standard formats:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let date=31MAR2019;
options locale=sv_SE;
data _null_;
date_var="&amp;amp;date."d;
format date_var date9.;
month_name=put(date_var, nldatemn10.);
call symputx('month_name',month_name);
run;
%put &amp;amp;month_name;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Log excerpt:&lt;/P&gt;
&lt;PRE&gt;35         %put &amp;amp;month_name;
mars
&lt;/PRE&gt;
&lt;P&gt;Documentation (Maxim 1!) is found at&lt;/P&gt;
&lt;P&gt;documentation.sas.com&lt;/P&gt;
&lt;P&gt;SAS® 9.4 and SAS® Viya® 3.4 Programming Documentation&lt;/P&gt;
&lt;P&gt;National Language Support (NLS)&lt;/P&gt;
&lt;P&gt;Formats for NLS&lt;/P&gt;</description>
      <pubDate>Tue, 09 Apr 2019 08:37:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Change-a-date-variable-to-Swedish/m-p/549516#M152494</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-04-09T08:37:24Z</dc:date>
    </item>
  </channel>
</rss>

