<?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 character datetime to datetime in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/character-datetime-to-datetime/m-p/634214#M188233</link>
    <description>&lt;P&gt;hello - i have been given a dataset called "char_dates" with a variable called "date_added" formatted as $CHAR20. and would like it converted to datetime.&lt;/P&gt;&lt;P&gt;examples of date_added entries:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3/21/2019 17:05 EDT&lt;/P&gt;&lt;P&gt;3/7/2019 18:10 EST&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have attempted the conversion with the following, but have been unsuccessful:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data num_dates;&lt;/P&gt;&lt;P&gt;set char_dates;&lt;/P&gt;&lt;P&gt;new_date = input(date_added, anydtdtm19.);&lt;/P&gt;&lt;P&gt;format new_date datetime19.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any advice?&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;</description>
    <pubDate>Mon, 23 Mar 2020 18:55:42 GMT</pubDate>
    <dc:creator>Orange4</dc:creator>
    <dc:date>2020-03-23T18:55:42Z</dc:date>
    <item>
      <title>character datetime to datetime</title>
      <link>https://communities.sas.com/t5/SAS-Programming/character-datetime-to-datetime/m-p/634214#M188233</link>
      <description>&lt;P&gt;hello - i have been given a dataset called "char_dates" with a variable called "date_added" formatted as $CHAR20. and would like it converted to datetime.&lt;/P&gt;&lt;P&gt;examples of date_added entries:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3/21/2019 17:05 EDT&lt;/P&gt;&lt;P&gt;3/7/2019 18:10 EST&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have attempted the conversion with the following, but have been unsuccessful:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data num_dates;&lt;/P&gt;&lt;P&gt;set char_dates;&lt;/P&gt;&lt;P&gt;new_date = input(date_added, anydtdtm19.);&lt;/P&gt;&lt;P&gt;format new_date datetime19.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any advice?&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;</description>
      <pubDate>Mon, 23 Mar 2020 18:55:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/character-datetime-to-datetime/m-p/634214#M188233</guid>
      <dc:creator>Orange4</dc:creator>
      <dc:date>2020-03-23T18:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: character datetime to datetime</title>
      <link>https://communities.sas.com/t5/SAS-Programming/character-datetime-to-datetime/m-p/634217#M188235</link>
      <description>&lt;P&gt;Unsuccessful? Please explain. What happens that is unsuccessful? Why do you think the result is unsuccessful? Are there error messages (if so, please show us)?&lt;/P&gt;</description>
      <pubDate>Mon, 23 Mar 2020 19:00:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/character-datetime-to-datetime/m-p/634217#M188235</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-03-23T19:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: character datetime to datetime</title>
      <link>https://communities.sas.com/t5/SAS-Programming/character-datetime-to-datetime/m-p/634219#M188236</link>
      <description>&lt;P&gt;my apologies - no error is created; rather the output is missing / null&lt;/P&gt;</description>
      <pubDate>Mon, 23 Mar 2020 19:01:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/character-datetime-to-datetime/m-p/634219#M188236</guid>
      <dc:creator>Orange4</dc:creator>
      <dc:date>2020-03-23T19:01:44Z</dc:date>
    </item>
    <item>
      <title>Re: character datetime to datetime</title>
      <link>https://communities.sas.com/t5/SAS-Programming/character-datetime-to-datetime/m-p/634223#M188238</link>
      <description>&lt;P&gt;Get rid of the alphabetic characters EDT or EST&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;new_date = input(compress(date_added,,'a'), anydtdtm19.);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 23 Mar 2020 19:11:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/character-datetime-to-datetime/m-p/634223#M188238</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-03-23T19:11:49Z</dc:date>
    </item>
    <item>
      <title>Re: character datetime to datetime</title>
      <link>https://communities.sas.com/t5/SAS-Programming/character-datetime-to-datetime/m-p/634229#M188239</link>
      <description>&lt;P&gt;brilliant - thanks so much!&lt;/P&gt;</description>
      <pubDate>Mon, 23 Mar 2020 19:21:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/character-datetime-to-datetime/m-p/634229#M188239</guid>
      <dc:creator>Orange4</dc:creator>
      <dc:date>2020-03-23T19:21:03Z</dc:date>
    </item>
  </channel>
</rss>

