<?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 Help in Conversion of Format for Date variables in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Help-in-Conversion-of-Format-for-Date-variables/m-p/54417#M2525</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi , &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #333333; font-family: Arial;"&gt;Please help in converting character variable (Start Date) to date format (mm/dd/yyyy). I have given an example below &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #333333; font-size: 10pt; font-family: Arial;"&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #333333; font-size: 10pt; font-family: Arial;"&gt;Start date $&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #333333; font-family: Arial;"&gt;11/1/2009 0:00:00&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #333333; font-family: Arial;"&gt;4/2/2009 0:00:00&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #333333; font-family: Arial;"&gt;26/1/2009 0:00:00&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #333333; font-family: Arial;"&gt;26/11/2009 0:00:00&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #333333; font-family: Arial;"&gt;26/11/2009 12:00:00 AM&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #333333; font-family: Arial;"&gt;1/11/2009 0:00:00&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #333333; font-family: Arial;"&gt;1/11/2009 12:00:00 AM&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #333333; font-family: Arial;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;Thank you for your help&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 26 Nov 2011 09:20:11 GMT</pubDate>
    <dc:creator>samHT</dc:creator>
    <dc:date>2011-11-26T09:20:11Z</dc:date>
    <item>
      <title>Help in Conversion of Format for Date variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Help-in-Conversion-of-Format-for-Date-variables/m-p/54417#M2525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi , &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #333333; font-family: Arial;"&gt;Please help in converting character variable (Start Date) to date format (mm/dd/yyyy). I have given an example below &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #333333; font-size: 10pt; font-family: Arial;"&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #333333; font-size: 10pt; font-family: Arial;"&gt;Start date $&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #333333; font-family: Arial;"&gt;11/1/2009 0:00:00&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #333333; font-family: Arial;"&gt;4/2/2009 0:00:00&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #333333; font-family: Arial;"&gt;26/1/2009 0:00:00&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #333333; font-family: Arial;"&gt;26/11/2009 0:00:00&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #333333; font-family: Arial;"&gt;26/11/2009 12:00:00 AM&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #333333; font-family: Arial;"&gt;1/11/2009 0:00:00&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #333333; font-family: Arial;"&gt;1/11/2009 12:00:00 AM&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #333333; font-family: Arial;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;Thank you for your help&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Nov 2011 09:20:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Help-in-Conversion-of-Format-for-Date-variables/m-p/54417#M2525</guid>
      <dc:creator>samHT</dc:creator>
      <dc:date>2011-11-26T09:20:11Z</dc:date>
    </item>
    <item>
      <title>Help in Conversion of Format for Date variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Help-in-Conversion-of-Format-for-Date-variables/m-p/54418#M2526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is one way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;options datestyle=dmy;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; informat Start_date $30.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input Start_date &amp;amp;;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;11/1/2009 0:00:00&lt;/P&gt;&lt;P&gt;4/2/2009 0:00:00&lt;/P&gt;&lt;P&gt;26/1/2009 0:00:00&lt;/P&gt;&lt;P&gt;26/11/2009 0:00:00&lt;/P&gt;&lt;P&gt;26/11/2009 12:00:00 AM&lt;/P&gt;&lt;P&gt;1/11/2009 0:00:00&lt;/P&gt;&lt;P&gt;1/11/2009 12:00:00 AM&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want (drop Start_date_in);&lt;/P&gt;&lt;P&gt;&amp;nbsp; set have (rename=(Start_date=Start_date_in));&lt;/P&gt;&lt;P&gt;&amp;nbsp; format Start_date mmddyy10.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Start_date=input(scan(Start_date_in,1,' ','r'), ddmmyy10.);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would have thought one could do it by inputting the entire datetime string, and using the anydtdtm informat, but it didn't work correctly for the 3rd from the last record.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Nov 2011 15:18:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Help-in-Conversion-of-Format-for-Date-variables/m-p/54418#M2526</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-11-26T15:18:12Z</dc:date>
    </item>
  </channel>
</rss>

