<?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 Reformatting a date variable from YYYYMMDD to MM/DD/YYYY in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Reformatting-a-date-variable-from-YYYYMMDD-to-MM-DD-YYYY/m-p/664745#M198643</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create a new variable from a date/time string of text that has the year, month day, hour, minutes, and seconds (yyyymmddhhmmss). I need to do two things:&lt;/P&gt;&lt;P&gt;1) truncate this variable so that it just has the month, day and year&lt;/P&gt;&lt;P&gt;2) reformat that to be mm/dd/yyyy&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TIA!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 24 Jun 2020 19:05:16 GMT</pubDate>
    <dc:creator>fordcr2</dc:creator>
    <dc:date>2020-06-24T19:05:16Z</dc:date>
    <item>
      <title>Reformatting a date variable from YYYYMMDD to MM/DD/YYYY</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reformatting-a-date-variable-from-YYYYMMDD-to-MM-DD-YYYY/m-p/664745#M198643</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create a new variable from a date/time string of text that has the year, month day, hour, minutes, and seconds (yyyymmddhhmmss). I need to do two things:&lt;/P&gt;&lt;P&gt;1) truncate this variable so that it just has the month, day and year&lt;/P&gt;&lt;P&gt;2) reformat that to be mm/dd/yyyy&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TIA!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2020 19:05:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reformatting-a-date-variable-from-YYYYMMDD-to-MM-DD-YYYY/m-p/664745#M198643</guid>
      <dc:creator>fordcr2</dc:creator>
      <dc:date>2020-06-24T19:05:16Z</dc:date>
    </item>
    <item>
      <title>Re: Reformatting a date variable from YYYYMMDD to MM/DD/YYYY</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reformatting-a-date-variable-from-YYYYMMDD-to-MM-DD-YYYY/m-p/664750#M198647</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;want = input(substr(have,1,8),yymmdd8.);
format want mmddyy10.;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 24 Jun 2020 19:11:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reformatting-a-date-variable-from-YYYYMMDD-to-MM-DD-YYYY/m-p/664750#M198647</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-06-24T19:11:03Z</dc:date>
    </item>
    <item>
      <title>Re: Reformatting a date variable from YYYYMMDD to MM/DD/YYYY</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reformatting-a-date-variable-from-YYYYMMDD-to-MM-DD-YYYY/m-p/664751#M198648</link>
      <description>&lt;P&gt;Do you want an actual DATE variable? Or another string variable?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data example;
  dtstring='20200624151423';
  date = input(dtstring,yymmdd8.);
  format date mmddyys10.;
  datestring=put(date,mmddyys10.);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 24 Jun 2020 19:15:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reformatting-a-date-variable-from-YYYYMMDD-to-MM-DD-YYYY/m-p/664751#M198648</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-06-24T19:15:40Z</dc:date>
    </item>
  </channel>
</rss>

