<?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 Need to convert character to date and time in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Need-to-convert-character-to-date-and-time/m-p/340011#M77655</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a variable Time, but its attributes is character. The example is&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;12/09/2016 05:15:00 AM&lt;/P&gt;&lt;P&gt;12/21/2016 05:23:00 AM&lt;/P&gt;&lt;P&gt;10/27/2016 08:35:00 AM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I convert this character to date and time, and still in one column? Since I have AM or PM there, is it possible?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Chen&lt;/P&gt;</description>
    <pubDate>Fri, 10 Mar 2017 15:04:19 GMT</pubDate>
    <dc:creator>echoli</dc:creator>
    <dc:date>2017-03-10T15:04:19Z</dc:date>
    <item>
      <title>Need to convert character to date and time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-to-convert-character-to-date-and-time/m-p/340011#M77655</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a variable Time, but its attributes is character. The example is&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;12/09/2016 05:15:00 AM&lt;/P&gt;&lt;P&gt;12/21/2016 05:23:00 AM&lt;/P&gt;&lt;P&gt;10/27/2016 08:35:00 AM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I convert this character to date and time, and still in one column? Since I have AM or PM there, is it possible?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Chen&lt;/P&gt;</description>
      <pubDate>Fri, 10 Mar 2017 15:04:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-to-convert-character-to-date-and-time/m-p/340011#M77655</guid>
      <dc:creator>echoli</dc:creator>
      <dc:date>2017-03-10T15:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: Need to convert character to date and time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-to-convert-character-to-date-and-time/m-p/340013#M77657</link>
      <description>&lt;P&gt;Assuming that it is mdy date, then:&lt;/P&gt;
&lt;PRE&gt;data want;
  txt="12/09/2016 05:15:00 AM";
  dt=input(txt,mdyampm24.);
  format dt datetime.;
run;&lt;/PRE&gt;</description>
      <pubDate>Fri, 10 Mar 2017 15:12:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-to-convert-character-to-date-and-time/m-p/340013#M77657</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-03-10T15:12:05Z</dc:date>
    </item>
    <item>
      <title>Re: Need to convert character to date and time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-to-convert-character-to-date-and-time/m-p/340423#M77799</link>
      <description>&lt;P&gt;Hi RW9,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That really works!!!&lt;/P&gt;&lt;P&gt;Thanks so much for your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Chen&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2017 14:15:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-to-convert-character-to-date-and-time/m-p/340423#M77799</guid>
      <dc:creator>echoli</dc:creator>
      <dc:date>2017-03-13T14:15:25Z</dc:date>
    </item>
  </channel>
</rss>

