<?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 this date from string to date ? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-this-date-from-string-to-date/m-p/150469#M29690</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;2014-04-09 06:24:28&amp;nbsp;&amp;nbsp;&amp;nbsp; became&amp;nbsp;&amp;nbsp;&amp;nbsp; 01JAN60:05:30:22&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;The format is correct but it's the wrong date and time, hmm..&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Jun 2014 19:47:50 GMT</pubDate>
    <dc:creator>shixin</dc:creator>
    <dc:date>2014-06-20T19:47:50Z</dc:date>
    <item>
      <title>How to convert this date from string to date ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-this-date-from-string-to-date/m-p/150467#M29688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A quick question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I convert this $21 to DATETIME18.?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have this: 2014-04-17 06:18:24&lt;/P&gt;&lt;P&gt;I want this: 17APR14:06:18:24&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What's wrong with my code? &lt;/P&gt;&lt;P&gt;timestamp1=input(timestamp,datetime18.);&lt;/P&gt;&lt;P&gt;format timestamp1 datetime18.;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you! &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 19:28:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-this-date-from-string-to-date/m-p/150467#M29688</guid>
      <dc:creator>shixin</dc:creator>
      <dc:date>2014-06-20T19:28:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert this date from string to date ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-this-date-from-string-to-date/m-p/150468#M29689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG&gt;timestamp1=input(timestamp, anydtdte21.);&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG&gt;format timestamp1 datetime18.;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 19:35:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-this-date-from-string-to-date/m-p/150468#M29689</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2014-06-20T19:35:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert this date from string to date ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-this-date-from-string-to-date/m-p/150469#M29690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;2014-04-09 06:24:28&amp;nbsp;&amp;nbsp;&amp;nbsp; became&amp;nbsp;&amp;nbsp;&amp;nbsp; 01JAN60:05:30:22&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;The format is correct but it's the wrong date and time, hmm..&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 19:47:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-this-date-from-string-to-date/m-p/150469#M29690</guid>
      <dc:creator>shixin</dc:creator>
      <dc:date>2014-06-20T19:47:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert this date from string to date ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-this-date-from-string-to-date/m-p/150470#M29691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello shixin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; string='2014-04-17 06:18:24';&lt;/P&gt;&lt;P&gt;&amp;nbsp; date=input(scan(string,1,' '),E8601DA10.);&lt;/P&gt;&lt;P&gt;&amp;nbsp; put date= date.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; time=input(scan(string,2,' '),time.);&lt;/P&gt;&lt;P&gt;&amp;nbsp; put time= time.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; dt=dhms(date,0,0,time);&lt;/P&gt;&lt;P&gt;&amp;nbsp; put dt datetime.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 19:57:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-this-date-from-string-to-date/m-p/150470#M29691</guid>
      <dc:creator>JasonAllen</dc:creator>
      <dc:date>2014-06-20T19:57:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert this date from string to date ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-this-date-from-string-to-date/m-p/150471#M29692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, it should have been informat &lt;STRONG&gt;ANYDTDTM21&lt;/STRONG&gt;. - PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 20:32:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-this-date-from-string-to-date/m-p/150471#M29692</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2014-06-20T20:32:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert this date from string to date ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-this-date-from-string-to-date/m-p/150472#M29693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;why when I run a case when statement on my newly formatted datetime, it says: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;case when &lt;STRONG&gt;dt=MIN(dt)&lt;/STRONG&gt; then ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ERROR: Result of WHEN clause 2 is not the same data type as the preceding&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; results.&lt;/P&gt;&lt;P&gt;ERROR: Expression using not equals (^=) has components that are of different&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data types.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Qn: Shouldn't the format of MIN(dt) be the same as dt???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 20:53:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-this-date-from-string-to-date/m-p/150472#M29693</guid>
      <dc:creator>shixin</dc:creator>
      <dc:date>2014-06-20T20:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert this date from string to date ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-this-date-from-string-to-date/m-p/150473#M29694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Strongly suspect 'dt' is Char.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 21:08:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-this-date-from-string-to-date/m-p/150473#M29694</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2014-06-20T21:08:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert this date from string to date ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-this-date-from-string-to-date/m-p/150474#M29695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please show the whole &lt;STRONG&gt;case ... end&lt;/STRONG&gt; code block.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 22:27:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-this-date-from-string-to-date/m-p/150474#M29695</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2014-06-20T22:27:06Z</dc:date>
    </item>
  </channel>
</rss>

