<?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: how to convert string as 'Wed Sep 15 12:28:27 2010' to datetime variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-convert-string-as-Wed-Sep-15-12-28-27-2010-to-datetime/m-p/72296#M15594</link>
    <description>Thanks very much!</description>
    <pubDate>Thu, 16 Sep 2010 05:28:14 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2010-09-16T05:28:14Z</dc:date>
    <item>
      <title>how to convert string as 'Wed Sep 15 12:28:27 2010' to datetime variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-convert-string-as-Wed-Sep-15-12-28-27-2010-to-datetime/m-p/72294#M15592</link>
      <description>Hi, all!&lt;BR /&gt;
&lt;BR /&gt;
    when i get the datetime stirng as 'Wed Sep 15 12:28:27 2010', how can i convert it to a datetime variable.&lt;BR /&gt;
    use the NLDATM function, you can give a format descriptor, then can get the datetime part, so, can i use a descriptor as '%a %b %d %H:%M:%S %Y', then can convert the string to a datetime variable?</description>
      <pubDate>Wed, 15 Sep 2010 14:07:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-convert-string-as-Wed-Sep-15-12-28-27-2010-to-datetime/m-p/72294#M15592</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-09-15T14:07:20Z</dc:date>
    </item>
    <item>
      <title>Re: how to convert string as 'Wed Sep 15 12:28:27 2010' to datetime variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-convert-string-as-Wed-Sep-15-12-28-27-2010-to-datetime/m-p/72295#M15593</link>
      <description>Instead of using the NLDATM function, would something like this work?&lt;BR /&gt;
&lt;BR /&gt;
data _null_;&lt;BR /&gt;
	worddate = 'Wed Sep 15 12:28:27 2010';&lt;BR /&gt;
	numberdate = input(scan(worddate, 3, ' ')!!scan(worddate, 2, ' ')!!scan(worddate, 5, ' ')!!':'!!scan(worddate, 4, ' '), datetime18.);&lt;BR /&gt;
	put 'The SAS date ' numberdate 'is ' worddate;&lt;BR /&gt;
run;</description>
      <pubDate>Wed, 15 Sep 2010 15:05:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-convert-string-as-Wed-Sep-15-12-28-27-2010-to-datetime/m-p/72295#M15593</guid>
      <dc:creator>polingjw</dc:creator>
      <dc:date>2010-09-15T15:05:27Z</dc:date>
    </item>
    <item>
      <title>Re: how to convert string as 'Wed Sep 15 12:28:27 2010' to datetime variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-convert-string-as-Wed-Sep-15-12-28-27-2010-to-datetime/m-p/72296#M15594</link>
      <description>Thanks very much!</description>
      <pubDate>Thu, 16 Sep 2010 05:28:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-convert-string-as-Wed-Sep-15-12-28-27-2010-to-datetime/m-p/72296#M15594</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-09-16T05:28:14Z</dc:date>
    </item>
  </channel>
</rss>

