<?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: Char to Numeric datetime conversion in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Char-to-Numeric-datetime-conversion/m-p/639486#M190262</link>
    <description>&lt;P&gt;The T between the date and time portion means that the DATETIME informat will not work as that expects a single punctuation character such as colon, space or slash. The T indicatess a separate ISO layout hence the different informat.&lt;/P&gt;</description>
    <pubDate>Mon, 13 Apr 2020 14:53:19 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2020-04-13T14:53:19Z</dc:date>
    <item>
      <title>Char to Numeric datetime conversion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Char-to-Numeric-datetime-conversion/m-p/639450#M190253</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the date and time in Char as below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Date and time&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2017-03-01T12:10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2017-03-01T13:02&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2017-03-07T22:15&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2017-03-19T09:32&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2017-04-12T11:45&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to converted to date and time into Numeric&lt;/P&gt;&lt;P&gt;What is the best way to handle this coversion?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;THANKS!!&lt;/P&gt;</description>
      <pubDate>Mon, 13 Apr 2020 13:05:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Char-to-Numeric-datetime-conversion/m-p/639450#M190253</guid>
      <dc:creator>zimcom</dc:creator>
      <dc:date>2020-04-13T13:05:41Z</dc:date>
    </item>
    <item>
      <title>Re: Char to Numeric datetime conversion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Char-to-Numeric-datetime-conversion/m-p/639451#M190254</link>
      <description>&lt;P&gt;You use the INPUT() function with the proper informat.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;num_date_time=input(char_date_time,e8601dt.);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You may also want to apply a format to num_date_time.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Apr 2020 13:12:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Char-to-Numeric-datetime-conversion/m-p/639451#M190254</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-04-13T13:12:08Z</dc:date>
    </item>
    <item>
      <title>Re: Char to Numeric datetime conversion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Char-to-Numeric-datetime-conversion/m-p/639455#M190255</link>
      <description>&lt;LI-CODE lang="markup"&gt;num_date_time=input(char_date_time,datetime.);&lt;/LI-CODE&gt;&lt;P&gt;I tried to convert using input as above, but it did not work (probably because there is a "T" in the character string to separate the date and time).&lt;/P&gt;</description>
      <pubDate>Mon, 13 Apr 2020 13:29:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Char-to-Numeric-datetime-conversion/m-p/639455#M190255</guid>
      <dc:creator>zimcom</dc:creator>
      <dc:date>2020-04-13T13:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: Char to Numeric datetime conversion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Char-to-Numeric-datetime-conversion/m-p/639462#M190256</link>
      <description>&lt;P&gt;If you change the code, then it might not work. If you use the exact code I provided, I know that it does work.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Apr 2020 13:41:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Char-to-Numeric-datetime-conversion/m-p/639462#M190256</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-04-13T13:41:52Z</dc:date>
    </item>
    <item>
      <title>Re: Char to Numeric datetime conversion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Char-to-Numeric-datetime-conversion/m-p/639463#M190257</link>
      <description>I really appreciated your help, Thank you so much!&lt;BR /&gt;Have a great day</description>
      <pubDate>Mon, 13 Apr 2020 13:46:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Char-to-Numeric-datetime-conversion/m-p/639463#M190257</guid>
      <dc:creator>zimcom</dc:creator>
      <dc:date>2020-04-13T13:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: Char to Numeric datetime conversion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Char-to-Numeric-datetime-conversion/m-p/639486#M190262</link>
      <description>&lt;P&gt;The T between the date and time portion means that the DATETIME informat will not work as that expects a single punctuation character such as colon, space or slash. The T indicatess a separate ISO layout hence the different informat.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Apr 2020 14:53:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Char-to-Numeric-datetime-conversion/m-p/639486#M190262</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-04-13T14:53:19Z</dc:date>
    </item>
  </channel>
</rss>

