<?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: how to solve below example in base sas and sql in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-solve-below-example-in-base-sas-and-sql/m-p/410552#M100311</link>
    <description>&lt;P&gt;MDY function in either data step or SQL.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the future please post what you've tried ahead of time so we can effectively help you.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 04 Nov 2017 15:57:24 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2017-11-04T15:57:24Z</dc:date>
    <item>
      <title>how to solve below example in base sas and sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-solve-below-example-in-base-sas-and-sql/m-p/410511#M100303</link>
      <description>&lt;P&gt;data have;&lt;BR /&gt;input ReAdm1-ReAdm2;&lt;BR /&gt;datalines;&lt;BR /&gt;1 2012&lt;/P&gt;&lt;P&gt;2 2013&lt;/P&gt;&lt;P&gt;3 2015&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;want output in one column like JAN-2012,FEB-2013,MAR-2015&amp;nbsp;&lt;/P&gt;&lt;P&gt;what i can do for it&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks in advance&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Nov 2017 06:54:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-solve-below-example-in-base-sas-and-sql/m-p/410511#M100303</guid>
      <dc:creator>ganeshmule</dc:creator>
      <dc:date>2017-11-04T06:54:18Z</dc:date>
    </item>
    <item>
      <title>Re: how to solve below example in base sas and sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-solve-below-example-in-base-sas-and-sql/m-p/410517#M100305</link>
      <description>&lt;P&gt;like this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input ReAdm1 ReAdm2;
datalines;
1 2012
2 2013
3 2015
;
run;

data want;
   set have;
   date = mdy(ReAdm1,1,ReAdm2);
   format date monyy7.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 04 Nov 2017 08:09:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-solve-below-example-in-base-sas-and-sql/m-p/410517#M100305</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2017-11-04T08:09:49Z</dc:date>
    </item>
    <item>
      <title>Re: how to solve below example in base sas and sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-solve-below-example-in-base-sas-and-sql/m-p/410552#M100311</link>
      <description>&lt;P&gt;MDY function in either data step or SQL.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the future please post what you've tried ahead of time so we can effectively help you.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Nov 2017 15:57:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-solve-below-example-in-base-sas-and-sql/m-p/410552#M100311</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-11-04T15:57:24Z</dc:date>
    </item>
    <item>
      <title>Re: how to solve below example in base sas and sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-solve-below-example-in-base-sas-and-sql/m-p/410639#M100338</link>
      <description>&lt;P&gt;Thank you for reply but i know that answer is coming like that&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;DIV class="xis-paraTableFirst"&gt;&lt;PRE class="xis-codeFragment"&gt;put date monyy7.; &lt;/PRE&gt;&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV class="xis-paraTableFirst"&gt;&lt;PRE class="xis-codeFragment"&gt;MAY2012&lt;/PRE&gt;&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but you have not seen my questions properly i want&amp;nbsp; &amp;nbsp;MAY-2012 instead of MAY2012&amp;nbsp; but thank you for time&amp;nbsp;&lt;/P&gt;&lt;P&gt;i did it.. for less time i asked that question over here&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data have;&lt;BR /&gt;input ReAdm1 ReAdm2;&lt;BR /&gt;datalines;&lt;BR /&gt;1 2012&lt;BR /&gt;2 2013&lt;BR /&gt;3 2015&lt;BR /&gt;;&lt;BR /&gt;run;&lt;BR /&gt;proc sql;&lt;BR /&gt;select *, mdy(readm1, 01, readm2) as date format=date11.,&lt;BR /&gt;substr (put(calculated date,date11.),4,length(put(calculated date,date11.))) as date&lt;BR /&gt;from have;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 05 Nov 2017 05:46:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-solve-below-example-in-base-sas-and-sql/m-p/410639#M100338</guid>
      <dc:creator>ganeshmule</dc:creator>
      <dc:date>2017-11-05T05:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: how to solve below example in base sas and sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-solve-below-example-in-base-sas-and-sql/m-p/410706#M100357</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/72657"&gt;@ganeshmule&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but you have not seen my questions properly i want&amp;nbsp; &amp;nbsp;MAY-2012 instead of MAY2012&amp;nbsp; but thank you for time&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i did it.. for less time i asked that question over here&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I would like to assume you've tried everything&amp;nbsp;&lt;U&gt;&lt;STRONG&gt;before&lt;/STRONG&gt;&lt;/U&gt; posting here in the first place.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;FYI -&amp;nbsp;you don't need the third parameter in the SUBSTR function.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
    input ReAdm1 ReAdm2;
    datalines;
1 2012
2 2013
3 2015
;
run;

data want;
    set have;
    mydate=mdy(readm1, 1, readm2);
    mydate2=catx('-', put(mydate, monname3.), put(mydate, year4.));
    mydate3 = substr(put(mydate, date11.), 4);
run;

proc print data=want;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 05 Nov 2017 19:44:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-solve-below-example-in-base-sas-and-sql/m-p/410706#M100357</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-11-05T19:44:08Z</dc:date>
    </item>
    <item>
      <title>Re: how to solve below example in base sas and sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-solve-below-example-in-base-sas-and-sql/m-p/410756#M100377</link>
      <description>Thank you ......&lt;span class="lia-unicode-emoji" title=":grinning_squinting_face:"&gt;😆&lt;/span&gt;</description>
      <pubDate>Mon, 06 Nov 2017 04:31:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-solve-below-example-in-base-sas-and-sql/m-p/410756#M100377</guid>
      <dc:creator>ganeshmule</dc:creator>
      <dc:date>2017-11-06T04:31:14Z</dc:date>
    </item>
  </channel>
</rss>

