<?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 Convert character variable to timestamp in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Convert-character-variable-to-timestamp/m-p/614132#M18550</link>
    <description>&lt;P&gt;Using SAS 9.4&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a method to convert a character variable in $16 format ( ie. '6/10/2017 5:28') into a numeric timestamp with&amp;nbsp;DATETIME16. format (ie. '03FEB17: 19:33:00')? Thank you&lt;/P&gt;</description>
    <pubDate>Fri, 27 Dec 2019 18:54:25 GMT</pubDate>
    <dc:creator>GS2</dc:creator>
    <dc:date>2019-12-27T18:54:25Z</dc:date>
    <item>
      <title>Convert character variable to timestamp</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Convert-character-variable-to-timestamp/m-p/614132#M18550</link>
      <description>&lt;P&gt;Using SAS 9.4&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a method to convert a character variable in $16 format ( ie. '6/10/2017 5:28') into a numeric timestamp with&amp;nbsp;DATETIME16. format (ie. '03FEB17: 19:33:00')? Thank you&lt;/P&gt;</description>
      <pubDate>Fri, 27 Dec 2019 18:54:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Convert-character-variable-to-timestamp/m-p/614132#M18550</guid>
      <dc:creator>GS2</dc:creator>
      <dc:date>2019-12-27T18:54:25Z</dc:date>
    </item>
    <item>
      <title>Re: Convert character variable to timestamp</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Convert-character-variable-to-timestamp/m-p/614135#M18551</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/194348"&gt;@GS2&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try the mdyampm informat&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a003172027.htm" target="_blank" rel="noopener"&gt;http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a003172027.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data want;
char_time='6/10/2017 5:28';
want_time=input(char_time,mdyampm15.);
format want_time datetime18.;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 27 Dec 2019 19:04:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Convert-character-variable-to-timestamp/m-p/614135#M18551</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-12-27T19:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: Convert character variable to timestamp</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Convert-character-variable-to-timestamp/m-p/614136#M18552</link>
      <description>&lt;P&gt;Convert the separate parts (use the scan() function) into a date and time, and use the dhms() function to combine them into a datetime (use the time value as the "seconds" argument).&lt;/P&gt;</description>
      <pubDate>Fri, 27 Dec 2019 19:04:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Convert-character-variable-to-timestamp/m-p/614136#M18552</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-12-27T19:04:05Z</dc:date>
    </item>
  </channel>
</rss>

