<?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 Date Formatting question in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Date-Formatting-question/m-p/28621#M6668</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Excel does not understand SAS's syntax of placing a colon between the date and the time.&lt;/P&gt;&lt;P&gt;But SAS does &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;P&gt;&lt;/P&gt;&lt;P&gt;data xx;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input date1 $20.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; new_date=datepart(input(date1,datetime.));&lt;/P&gt;&lt;P&gt;&amp;nbsp; format new_date yymmn6.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; new_char=put(datepart(input(date1,datetime.)),yymmn6.);&lt;/P&gt;&lt;P&gt;&amp;nbsp; put (date1 new_date new_char) (=);&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;17MAR2000:00:01:45&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;date1=17MAR2000:00:01:45 new_date=200003 new_char=200003&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 Mar 2012 16:28:38 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2012-03-12T16:28:38Z</dc:date>
    <item>
      <title>Date Formatting question</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Date-Formatting-question/m-p/28618#M6665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P id="post_message_5872837"&gt;-importing a file to SAS from excel&lt;BR /&gt;-contains a date in format like 17mar2000:00:00:00 imported as character&lt;BR /&gt;-want it to be formatted like 200003&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tried&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;newdate=datepart(date1);&lt;BR /&gt;put newdate=yymmn7.;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Mar 2012 15:22:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Date-Formatting-question/m-p/28618#M6665</guid>
      <dc:creator>peka0027</dc:creator>
      <dc:date>2012-03-12T15:22:42Z</dc:date>
    </item>
    <item>
      <title>Date Formatting question</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Date-Formatting-question/m-p/28619#M6666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 12pt; background-color: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 12pt;"&gt; have;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 12pt;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 12pt;"&gt; dt $ &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 12pt; background-color: white; font-family: 'Courier New';"&gt;20.&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 12pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 12pt;"&gt;cards&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 12pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffc0; font-family: 'Courier New'; color: black; font-size: 12pt;"&gt;17mar2000:00:00:00 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 12pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 12pt; background-color: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 12pt;"&gt; want(drop=dt);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 12pt;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 12pt;"&gt; have;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 12pt;"&gt; date=put(input(scan(dt,&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 12pt; background-color: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 12pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: purple; font-size: 12pt;"&gt;':'&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 12pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: teal; font-size: 12pt;"&gt;date9.&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 12pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: teal; font-size: 12pt;"&gt;yymmn7.&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 12pt;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 12pt; background-color: white; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; font-size: 12pt; background-color: white; font-family: 'Courier New';"&gt;print&lt;/STRONG&gt;;&lt;STRONG style="color: navy; font-size: 12pt; background-color: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Mar 2012 15:33:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Date-Formatting-question/m-p/28619#M6666</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2012-03-12T15:33:00Z</dc:date>
    </item>
    <item>
      <title>Date Formatting question</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Date-Formatting-question/m-p/28620#M6667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Sorry I should have been more specific.&amp;nbsp; I have a column of dates in this format (different dates) and want to reformat the entire column to the new format.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Mar 2012 15:34:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Date-Formatting-question/m-p/28620#M6667</guid>
      <dc:creator>peka0027</dc:creator>
      <dc:date>2012-03-12T15:34:56Z</dc:date>
    </item>
    <item>
      <title>Date Formatting question</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Date-Formatting-question/m-p/28621#M6668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Excel does not understand SAS's syntax of placing a colon between the date and the time.&lt;/P&gt;&lt;P&gt;But SAS does &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;P&gt;&lt;/P&gt;&lt;P&gt;data xx;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input date1 $20.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; new_date=datepart(input(date1,datetime.));&lt;/P&gt;&lt;P&gt;&amp;nbsp; format new_date yymmn6.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; new_char=put(datepart(input(date1,datetime.)),yymmn6.);&lt;/P&gt;&lt;P&gt;&amp;nbsp; put (date1 new_date new_char) (=);&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;17MAR2000:00:01:45&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;date1=17MAR2000:00:01:45 new_date=200003 new_char=200003&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Mar 2012 16:28:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Date-Formatting-question/m-p/28621#M6668</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2012-03-12T16:28:38Z</dc:date>
    </item>
  </channel>
</rss>

