<?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: convert 2 vars (char type) to 2 vars (date type) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/convert-2-vars-char-type-to-2-vars-date-type/m-p/336797#M76387</link>
    <description>&lt;P&gt;Use the INPUT function.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NEW_VAR = INPUT( old_var_name, current_format);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 01 Mar 2017 00:08:41 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2017-03-01T00:08:41Z</dc:date>
    <item>
      <title>convert 2 vars (char type) to 2 vars (date type)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/convert-2-vars-char-type-to-2-vars-date-type/m-p/336795#M76386</link>
      <description>&lt;P&gt;I have 2 vars (char type):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;date 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date 2&lt;/P&gt;&lt;P&gt;26/07/2013&amp;nbsp;&amp;nbsp; 10/04/2014 07:50:11 p.m.&lt;BR /&gt;28/02/2013&amp;nbsp; &amp;nbsp;12/09/2012 12:46:29&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to convert to data type, how can I do it?&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2017 00:02:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/convert-2-vars-char-type-to-2-vars-date-type/m-p/336795#M76386</guid>
      <dc:creator>Angel_Saenz</dc:creator>
      <dc:date>2017-03-01T00:02:27Z</dc:date>
    </item>
    <item>
      <title>Re: convert 2 vars (char type) to 2 vars (date type)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/convert-2-vars-char-type-to-2-vars-date-type/m-p/336797#M76387</link>
      <description>&lt;P&gt;Use the INPUT function.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NEW_VAR = INPUT( old_var_name, current_format);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2017 00:08:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/convert-2-vars-char-type-to-2-vars-date-type/m-p/336797#M76387</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-03-01T00:08:41Z</dc:date>
    </item>
    <item>
      <title>Re: convert 2 vars (char type) to 2 vars (date type)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/convert-2-vars-char-type-to-2-vars-date-type/m-p/336834#M76402</link>
      <description>&lt;P&gt;Your problem description talks about dates, and not datetimes. &amp;nbsp;To get dates only, you could use:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;date_1_converted = input(date1, ddmmyy10.);&lt;/P&gt;
&lt;P&gt;date_2_converted = input(date2, ddmmyy10.);&lt;/P&gt;
&lt;P&gt;format date_1_converted date_2_converted yymmdd10.;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There's no need to apply YYMMDD10 as the final format. &amp;nbsp;That's just an example of what is possible.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also note, it's not 100% clear that DATE_2_CONVERTED should apply the DDMMYY10 informat to convert it. &amp;nbsp;That would be applicable when the character values actually include the day then the month then the year. &amp;nbsp;But it's also conceivable that the character values contain the month then the day then the year. &amp;nbsp;In that case, convert with:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;date_2_converted = input(date2, mmddyy10.);&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2017 04:12:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/convert-2-vars-char-type-to-2-vars-date-type/m-p/336834#M76402</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-03-01T04:12:14Z</dc:date>
    </item>
  </channel>
</rss>

