<?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 Re: Month no as a two digit value in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Month-no-as-a-two-digit-value/m-p/821464#M41004</link>
    <description>&lt;P&gt;Why call symputx?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let Date_selected = 01Feb2022;
%let m = %sysfunc(month("&amp;amp;date_selected."d), z2.);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 04 Jul 2022 08:29:12 GMT</pubDate>
    <dc:creator>andreas_lds</dc:creator>
    <dc:date>2022-07-04T08:29:12Z</dc:date>
    <item>
      <title>Month no as a two digit value</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Month-no-as-a-two-digit-value/m-p/821462#M41002</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I have a SAS date as a macro variable as follows:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;%let Date_selected = 01Feb2022&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I want to extract the month as a two digit no from this.&lt;/P&gt;&lt;P&gt;(eg: FEB =&amp;gt; month_no = 02,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Mar =&amp;gt; month_no = 03,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Apr =&amp;gt; month_no = 04&lt;/P&gt;&lt;P&gt;etc).&lt;/P&gt;&lt;P&gt;With SYMPUTX I can get the month as a digit but not in 2 digit format.&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;&lt;STRONG&gt;call symputx("month_no",put("&amp;amp;Date_selected"d,month.));&lt;/STRONG&gt; /*this gives &lt;STRONG&gt;month_no = 2&lt;/STRONG&gt;*/&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Can someone help me with this?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jul 2022 07:31:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Month-no-as-a-two-digit-value/m-p/821462#M41002</guid>
      <dc:creator>madara155</dc:creator>
      <dc:date>2022-07-04T07:31:51Z</dc:date>
    </item>
    <item>
      <title>Re: Month no as a two digit value</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Month-no-as-a-two-digit-value/m-p/821463#M41003</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let Date_selected = 01Feb2022;

data _null_;
   m = put(month("&amp;amp;Date_selected"d), z2.);
   call symputx('m', m);
run;

%put &amp;amp;m.;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 04 Jul 2022 07:43:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Month-no-as-a-two-digit-value/m-p/821463#M41003</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2022-07-04T07:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: Month no as a two digit value</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Month-no-as-a-two-digit-value/m-p/821464#M41004</link>
      <description>&lt;P&gt;Why call symputx?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let Date_selected = 01Feb2022;
%let m = %sysfunc(month("&amp;amp;date_selected."d), z2.);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 04 Jul 2022 08:29:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Month-no-as-a-two-digit-value/m-p/821464#M41004</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2022-07-04T08:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: Month no as a two digit value</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Month-no-as-a-two-digit-value/m-p/821511#M41006</link>
      <description>&lt;P&gt;Thank you very much &lt;span class="lia-unicode-emoji" title=":folded_hands:"&gt;🙏&lt;/span&gt; You saved my life&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jul 2022 23:33:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Month-no-as-a-two-digit-value/m-p/821511#M41006</guid>
      <dc:creator>madara155</dc:creator>
      <dc:date>2022-07-04T23:33:02Z</dc:date>
    </item>
  </channel>
</rss>

