<?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: Pulling day &amp;amp; Month only in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Pulling-day-amp-Month-only/m-p/715371#M220949</link>
    <description>&lt;P&gt;Do you really need the hyphen?&amp;nbsp; If not just use DTDATE5. format.&lt;/P&gt;
&lt;PRE&gt;426  data test;
427    dob = '17MAR1957:00:00:00.000'dt ;
428    put dob dtdate5. ;
429  run;

17MAR
&lt;/PRE&gt;</description>
    <pubDate>Fri, 29 Jan 2021 16:53:57 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2021-01-29T16:53:57Z</dc:date>
    <item>
      <title>Pulling day &amp; Month only</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Pulling-day-amp-Month-only/m-p/715318#M220929</link>
      <description>&lt;P&gt;Good day,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to extract just the day and Month dd-mmm from a datetime field.&lt;/P&gt;&lt;P&gt;The data is being pulled via Proc SQL; as the data resides on the SQL server.&lt;/P&gt;&lt;P&gt;e.DateOfBirth&amp;nbsp; give .17MAR1957:00:00:00.000&amp;nbsp; --&amp;gt; need --&amp;gt; &lt;STRONG&gt;17-Mar&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Its formatting in SQL is&amp;nbsp;&amp;nbsp;datetime (length 8 )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Will appreciate any assistance.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2021 15:26:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Pulling-day-amp-Month-only/m-p/715318#M220929</guid>
      <dc:creator>ColleenCB</dc:creator>
      <dc:date>2021-01-29T15:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: Pulling day &amp; Month only</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Pulling-day-amp-Month-only/m-p/715340#M220938</link>
      <description>&lt;P&gt;Please tell us how you intend to use the value like 17-Mar?&lt;/P&gt;
&lt;P&gt;Typically I would use the DATEPART function to create a date value from the datetime and assign an appropriate format. But someone ignoring year may have other thoughts in mind.&lt;/P&gt;
&lt;P&gt;You might also need to show how you expect single digit days of the month to appear.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc format;
picture ddmon 
low-high = '%0d-%3b'   (datatype=date)
;
run;

data example;
   x="17MAR1957:00:00:00.000"dt;
   y=datepart(x);
   format  y ddmon.;
run;
   &lt;/PRE&gt;
&lt;P&gt;By creating a date value, as in Y, you preserve the option of changing the display appearance by changing the display format as needed.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2021 16:01:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Pulling-day-amp-Month-only/m-p/715340#M220938</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-01-29T16:01:15Z</dc:date>
    </item>
    <item>
      <title>Re: Pulling day &amp; Month only</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Pulling-day-amp-Month-only/m-p/715367#M220948</link>
      <description>&lt;P&gt;Hi &lt;A class="trigger-hovercard" style="color: #007dc3;" href="https://communities.sas.com/t5/user/viewprofilepage/user-id/131614" target="_blank" rel="noopener"&gt;ColleenCB&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;Here is how you can get various flavors of day&amp;amp;month:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
   length y $6;
   x = '17MAR1957:00:00:00.000'dt;
   y = put(datepart(x),date5.); /* 17MAR */
   put y=;
   y = catx('-',substr(y,1,2),substr(y,3)); /* 17-MAR */
   put y=;
   y = propcase(y); /* 17-Mar */
   put y=;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2021 16:58:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Pulling-day-amp-Month-only/m-p/715367#M220948</guid>
      <dc:creator>LeonidBatkhan</dc:creator>
      <dc:date>2021-01-29T16:58:22Z</dc:date>
    </item>
    <item>
      <title>Re: Pulling day &amp; Month only</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Pulling-day-amp-Month-only/m-p/715371#M220949</link>
      <description>&lt;P&gt;Do you really need the hyphen?&amp;nbsp; If not just use DTDATE5. format.&lt;/P&gt;
&lt;PRE&gt;426  data test;
427    dob = '17MAR1957:00:00:00.000'dt ;
428    put dob dtdate5. ;
429  run;

17MAR
&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 Jan 2021 16:53:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Pulling-day-amp-Month-only/m-p/715371#M220949</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-01-29T16:53:57Z</dc:date>
    </item>
    <item>
      <title>Re: Pulling day</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Pulling-day-amp-Month-only/m-p/715611#M221042</link>
      <description>Thank you so much!&lt;BR /&gt;This worked perfectly.&lt;BR /&gt;&lt;BR /&gt;Have a wonderful day&lt;BR /&gt;Kind Regards&lt;BR /&gt;Colleen Bronkhorst&lt;BR /&gt;Business Intelligence Analyst&lt;BR /&gt;FNB HR Employee Intelligence&lt;BR /&gt;1 First Place&lt;BR /&gt;BankCity&lt;BR /&gt;Tel: 0875 77 77 11&lt;BR /&gt;&lt;BR /&gt;Rate my service:&lt;BR /&gt;Click on the link: Thank you for your rating&lt;BR /&gt;Select Nominate and enter my F-number 3340945&lt;BR /&gt;Select 1 or more Categories you wish to rate my service in&lt;BR /&gt;[cid:image001.jpg@01D6F7BE.38024C90]&lt;BR /&gt;Click on Nominate&lt;BR /&gt;dm&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;This email is subject to a disclaimer.&lt;BR /&gt;&lt;BR /&gt;Visit the FNB website and view the email disclaimer and privacy notice / policy by clicking the "About FNB + Legal" and "Legal Matters" links.&lt;BR /&gt;If you are unable to access our website, please contact us to send you a copy of the email disclaimer or privacy notice / policy .</description>
      <pubDate>Sun, 31 Jan 2021 08:46:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Pulling-day-amp-Month-only/m-p/715611#M221042</guid>
      <dc:creator>ColleenCB</dc:creator>
      <dc:date>2021-01-31T08:46:13Z</dc:date>
    </item>
    <item>
      <title>Re: Pulling day &amp; Month only</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Pulling-day-amp-Month-only/m-p/715612#M221043</link>
      <description>&lt;P&gt;I like the formatting &amp;amp; it also works for my problem.&lt;/P&gt;&lt;P&gt;But not required in this exercise.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much for answering me.&lt;/P&gt;</description>
      <pubDate>Sun, 31 Jan 2021 08:51:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Pulling-day-amp-Month-only/m-p/715612#M221043</guid>
      <dc:creator>ColleenCB</dc:creator>
      <dc:date>2021-01-31T08:51:36Z</dc:date>
    </item>
    <item>
      <title>Re: Pulling day &amp; Month only</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Pulling-day-amp-Month-only/m-p/715613#M221044</link>
      <description>&lt;P&gt;Thank you so much for this post.&lt;/P&gt;&lt;P&gt;I will need to keep it save and use it more often - practice makes perfect.&lt;/P&gt;&lt;P&gt;This works perfectly for my requirement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have a wonderful day&lt;/P&gt;</description>
      <pubDate>Sun, 31 Jan 2021 08:53:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Pulling-day-amp-Month-only/m-p/715613#M221044</guid>
      <dc:creator>ColleenCB</dc:creator>
      <dc:date>2021-01-31T08:53:43Z</dc:date>
    </item>
  </channel>
</rss>

