<?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: Long SAS Date to Shorter Output Date in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Long-SAS-Date-to-Shorter-Output-Date/m-p/429712#M281531</link>
    <description>&lt;P&gt;You can use the DTDATE format to print just the date part of a datetime value, but it does not support printing the hyphens.&lt;/P&gt;
&lt;P&gt;Or you could convert your datetime value (number of seconds) into a date value (number of days) and then use the DATE11. format.&lt;/P&gt;
&lt;PRE&gt;287  data _null_;
288    dt='01MAR1993:00:00:00'dt;
289    date=datepart(dt);
290    put dt= dt datetime20. +1 dt dtdate9. ;
291    put date=  date date11. ;
292  run;

dt=1046563200   01MAR1993:00:00:00 01MAR1993
date=12113 01-MAR-1993&lt;/PRE&gt;</description>
    <pubDate>Mon, 22 Jan 2018 18:01:20 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2018-01-22T18:01:20Z</dc:date>
    <item>
      <title>Long SAS Date to Shorter Output Date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Long-SAS-Date-to-Shorter-Output-Date/m-p/429617#M281527</link>
      <description>&lt;P&gt;I have a column titled "Birth_Date" with long SAS date values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The dates look like this: 01MAR1993:00:00:00&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All I want is to convert those values to the following format: 01-MAR-1993.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, long story short. I just want to convert the date to a different format. I've seen other solutions that are close, but I can't seem to get to the finish line on this one. Spare me the judgment please &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2018 14:24:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Long-SAS-Date-to-Shorter-Output-Date/m-p/429617#M281527</guid>
      <dc:creator>eer_seer</dc:creator>
      <dc:date>2018-01-22T14:24:26Z</dc:date>
    </item>
    <item>
      <title>Re: Long SAS Date to Shorter Output Date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Long-SAS-Date-to-Shorter-Output-Date/m-p/429620#M281528</link>
      <description>&lt;P&gt;Use the DATE11. format.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2018 14:26:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Long-SAS-Date-to-Shorter-Output-Date/m-p/429620#M281528</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-01-22T14:26:37Z</dc:date>
    </item>
    <item>
      <title>Re: Long SAS Date to Shorter Output Date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Long-SAS-Date-to-Shorter-Output-Date/m-p/429622#M281529</link>
      <description>&lt;P&gt;Convert the datetime value to a date:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;birth_date = datepart(birth_date);
format birth_date date11.;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 22 Jan 2018 14:30:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Long-SAS-Date-to-Shorter-Output-Date/m-p/429622#M281529</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-01-22T14:30:38Z</dc:date>
    </item>
    <item>
      <title>Re: Long SAS Date to Shorter Output Date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Long-SAS-Date-to-Shorter-Output-Date/m-p/429623#M281530</link>
      <description>&lt;P&gt;Perfect!&amp;nbsp; Thank you so much!&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2018 14:32:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Long-SAS-Date-to-Shorter-Output-Date/m-p/429623#M281530</guid>
      <dc:creator>eer_seer</dc:creator>
      <dc:date>2018-01-22T14:32:17Z</dc:date>
    </item>
    <item>
      <title>Re: Long SAS Date to Shorter Output Date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Long-SAS-Date-to-Shorter-Output-Date/m-p/429712#M281531</link>
      <description>&lt;P&gt;You can use the DTDATE format to print just the date part of a datetime value, but it does not support printing the hyphens.&lt;/P&gt;
&lt;P&gt;Or you could convert your datetime value (number of seconds) into a date value (number of days) and then use the DATE11. format.&lt;/P&gt;
&lt;PRE&gt;287  data _null_;
288    dt='01MAR1993:00:00:00'dt;
289    date=datepart(dt);
290    put dt= dt datetime20. +1 dt dtdate9. ;
291    put date=  date date11. ;
292  run;

dt=1046563200   01MAR1993:00:00:00 01MAR1993
date=12113 01-MAR-1993&lt;/PRE&gt;</description>
      <pubDate>Mon, 22 Jan 2018 18:01:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Long-SAS-Date-to-Shorter-Output-Date/m-p/429712#M281531</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-01-22T18:01:20Z</dc:date>
    </item>
  </channel>
</rss>

