<?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 Format Date to DD-Mon in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Format-Date-to-DD-Mon/m-p/635579#M188735</link>
    <description>&lt;P&gt;Hi, I'd like to make a picture format of the date, but it should be in proper case. See samples below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Date_Field&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;New_Date_Format&lt;/P&gt;
&lt;P&gt;29MAR2020&amp;nbsp; &amp;nbsp; &amp;nbsp;29-Mar&lt;/P&gt;
&lt;P&gt;01JAN2020&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1-Jan&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm exporting these to excel, so I prefer to maintain the date formats. Thanks.&lt;/P&gt;</description>
    <pubDate>Sun, 29 Mar 2020 03:58:49 GMT</pubDate>
    <dc:creator>angeliquec</dc:creator>
    <dc:date>2020-03-29T03:58:49Z</dc:date>
    <item>
      <title>Format Date to DD-Mon</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format-Date-to-DD-Mon/m-p/635579#M188735</link>
      <description>&lt;P&gt;Hi, I'd like to make a picture format of the date, but it should be in proper case. See samples below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Date_Field&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;New_Date_Format&lt;/P&gt;
&lt;P&gt;29MAR2020&amp;nbsp; &amp;nbsp; &amp;nbsp;29-Mar&lt;/P&gt;
&lt;P&gt;01JAN2020&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1-Jan&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm exporting these to excel, so I prefer to maintain the date formats. Thanks.&lt;/P&gt;</description>
      <pubDate>Sun, 29 Mar 2020 03:58:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format-Date-to-DD-Mon/m-p/635579#M188735</guid>
      <dc:creator>angeliquec</dc:creator>
      <dc:date>2020-03-29T03:58:49Z</dc:date>
    </item>
    <item>
      <title>Re: Format Date to DD-Mon</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format-Date-to-DD-Mon/m-p/635580#M188736</link>
      <description>If you putting them into Excel then move the actual date and just tell Excel how you want it displayed.</description>
      <pubDate>Sun, 29 Mar 2020 04:40:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format-Date-to-DD-Mon/m-p/635580#M188736</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-03-29T04:40:51Z</dc:date>
    </item>
    <item>
      <title>Re: Format Date to DD-Mon</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format-Date-to-DD-Mon/m-p/635581#M188737</link>
      <description>&lt;P&gt;If this is more about getting a specific format in Excel then below demonstrates how to use a style for defining such a format.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  input Date_Field:date9.;
  format Date_Field date9.;
  some_other_var1=_n_;
  some_other_var2='ABC';
  datalines;
29MAR2020
01JAN2020
;

options missing=' ';
ods listing close;
ods excel file='~/test/test.xlsx';
proc print data=have;
  var some_other_var1;
  var Date_Field / style(column)={tagattr='format: dd-mmm'};
  var some_other_var2;
run;
ods excel close;
ods listing;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Patrick_0-1585464300513.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/37494iAA8FA21D1D82C1B1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Patrick_0-1585464300513.png" alt="Patrick_0-1585464300513.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 29 Mar 2020 22:27:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format-Date-to-DD-Mon/m-p/635581#M188737</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2020-03-29T22:27:03Z</dc:date>
    </item>
    <item>
      <title>Re: Format Date to DD-Mon</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format-Date-to-DD-Mon/m-p/635590#M188738</link>
      <description>&lt;P&gt;The SAS custom format would be:&lt;/P&gt;
&lt;PRE&gt;Proc format library=work;
picture ddmon
low - high ='%d-%3B' (datatype=date);
;
run;

data example;
x = '29Mar2020'd;
y = '01Jan2020'd;
put x= ddmon. +1 y= ddmon.;
run;&lt;/PRE&gt;
&lt;P&gt;Custom date formats like this may not work as intended when used with graphs though.&lt;/P&gt;
&lt;P&gt;The quotes in the Picture statement must be single quotes and the case of the letters is important.&lt;/P&gt;
&lt;P&gt;I have no idea if Excel will honor this either.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 29 Mar 2020 08:26:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format-Date-to-DD-Mon/m-p/635590#M188738</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-03-29T08:26:38Z</dc:date>
    </item>
  </channel>
</rss>

