<?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: Is it possible to reformat character to date? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Is-it-possible-to-reformat-character-to-date/m-p/229074#M54364</link>
    <description>&lt;P&gt;As Reeza has pointed out, conversion is pretty simple, and just drop the "Not" values. &amp;nbsp;However I would question firstly what those dates reflect, is it really MMDDYY, or DDMMYY? &amp;nbsp;Secondly why dates in DateA do not have the padding zero. &amp;nbsp;Looks a bit fishey if you ask me, I would check the source data.&lt;/P&gt;</description>
    <pubDate>Thu, 08 Oct 2015 08:40:59 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2015-10-08T08:40:59Z</dc:date>
    <item>
      <title>Is it possible to reformat character to date?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Is-it-possible-to-reformat-character-to-date/m-p/229022#M54359</link>
      <description>&lt;P&gt;Im trying to reformat&amp;nbsp;column DateA to &lt;SPAN&gt;column &lt;/SPAN&gt;DateB. The tricky part is there are characters in the column, ie "Not Applicable", so SAS is reading the whole column as character. I tried many different ways but they don't seem like working. So I wonder if it is possible to reformat date if there are characters in the column.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="359"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="88"&gt;Group&lt;/TD&gt;
&lt;TD width="144"&gt;DateA&lt;/TD&gt;
&lt;TD width="127"&gt;DateB&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Group A&lt;/TD&gt;
&lt;TD&gt;4/1/2016&lt;/TD&gt;
&lt;TD&gt;04/01/2016&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Group B&lt;/TD&gt;
&lt;TD&gt;5/2/2016&lt;/TD&gt;
&lt;TD&gt;05/02/2016&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Group C&lt;/TD&gt;
&lt;TD&gt;8/1/2016&lt;/TD&gt;
&lt;TD&gt;08/01/2016&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Group D&lt;/TD&gt;
&lt;TD&gt;10/8/2016&lt;/TD&gt;
&lt;TD&gt;10/08/2016&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Group E&lt;/TD&gt;
&lt;TD&gt;Not Applicable&lt;/TD&gt;
&lt;TD&gt;Not Applicable&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Group F&lt;/TD&gt;
&lt;TD&gt;5/1/2016&lt;/TD&gt;
&lt;TD&gt;05/01/2016&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Group G&lt;/TD&gt;
&lt;TD&gt;Not Applicable&lt;/TD&gt;
&lt;TD&gt;Not Applicable&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Group H&lt;/TD&gt;
&lt;TD&gt;6/9/2016&lt;/TD&gt;
&lt;TD&gt;06/09/2016&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Group I&lt;/TD&gt;
&lt;TD&gt;Not Applicable&lt;/TD&gt;
&lt;TD&gt;Not Applicable&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Group J&lt;/TD&gt;
&lt;TD&gt;9/1/2016&lt;/TD&gt;
&lt;TD&gt;09/01/2016&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Group K&lt;/TD&gt;
&lt;TD&gt;1/10/2016&lt;/TD&gt;
&lt;TD&gt;01/10/2016&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Wed, 07 Oct 2015 21:59:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Is-it-possible-to-reformat-character-to-date/m-p/229022#M54359</guid>
      <dc:creator>ernie86</dc:creator>
      <dc:date>2015-10-07T21:59:02Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to reformat character to date?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Is-it-possible-to-reformat-character-to-date/m-p/229029#M54360</link>
      <description>&lt;P&gt;You can conditionally execute your code. This could be made a one-liner if you use ifn/ifc and/or if you apply ? to your input format, but I'll let you work those out &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if dateb='Not Applicable' then dateb_converted=.;&lt;/P&gt;
&lt;P&gt;else dateb=input(dateb, mmddyy10.);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2015 22:19:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Is-it-possible-to-reformat-character-to-date/m-p/229029#M54360</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-10-07T22:19:26Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to reformat character to date?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Is-it-possible-to-reformat-character-to-date/m-p/229074#M54364</link>
      <description>&lt;P&gt;As Reeza has pointed out, conversion is pretty simple, and just drop the "Not" values. &amp;nbsp;However I would question firstly what those dates reflect, is it really MMDDYY, or DDMMYY? &amp;nbsp;Secondly why dates in DateA do not have the padding zero. &amp;nbsp;Looks a bit fishey if you ask me, I would check the source data.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2015 08:40:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Is-it-possible-to-reformat-character-to-date/m-p/229074#M54364</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-10-08T08:40:59Z</dc:date>
    </item>
  </channel>
</rss>

