<?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: changing from a date format &amp;quot;mm/dd/yyyy&amp;quot; to character format &amp;quot;mmddyyyy&amp;quot; in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/changing-from-a-date-format-quot-mm-dd-yyyy-quot-to-character/m-p/87941#M608</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Linlin, thanks! &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&amp;nbsp; it's perfect.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Apr 2012 15:58:04 GMT</pubDate>
    <dc:creator>Cyndia</dc:creator>
    <dc:date>2012-04-18T15:58:04Z</dc:date>
    <item>
      <title>changing from a date format "mm/dd/yyyy" to character format "mmddyyyy"</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/changing-from-a-date-format-quot-mm-dd-yyyy-quot-to-character/m-p/87939#M606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In an existing dataset, is there a way to change a column of dates in the format of "mm/dd/yyyy" to character format of "mmddyyyy"?&amp;nbsp; thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2012 15:45:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/changing-from-a-date-format-quot-mm-dd-yyyy-quot-to-character/m-p/87939#M606</guid>
      <dc:creator>Cyndia</dc:creator>
      <dc:date>2012-04-18T15:45:58Z</dc:date>
    </item>
    <item>
      <title>Re: changing from a date format "mm/dd/yyyy" to character format "mmddyyyy"</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/changing-from-a-date-format-quot-mm-dd-yyyy-quot-to-character/m-p/87940#M607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: navy; font-size: 12pt; background: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt; have;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 12pt;"&gt;informat&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt; date &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: teal; font-size: 12pt;"&gt;mmddyy10.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 12pt;"&gt;format&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt; date &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: teal; font-size: 12pt;"&gt;mmddyy10.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 12pt;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt; date;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 12pt;"&gt;cards&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 12pt;"&gt;01/31/2012&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: navy; font-size: 12pt; background: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt; want;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 12pt;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt; have;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt;ndate=put(date,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: teal; font-size: 12pt;"&gt;mmddyyn.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: navy; font-size: 12pt; background: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="color: navy; font-size: 12pt; background: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;print&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt;;&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-size: 12pt; background: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt;or &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 12pt; background: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt; want;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 12pt;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt; have(rename=date=ndate) ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt; date=put(ndate,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: teal; font-size: 12pt;"&gt;mmddyyn.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 12pt;"&gt;drop&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt; ndate;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 12pt; background: white; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; font-size: 12pt; background: white; font-family: 'Courier New';"&gt;print&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt;;&lt;/SPAN&gt;&lt;STRONG style="color: navy; font-size: 12pt; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;Obs&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 01312012&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2012 15:56:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/changing-from-a-date-format-quot-mm-dd-yyyy-quot-to-character/m-p/87940#M607</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2012-04-18T15:56:33Z</dc:date>
    </item>
    <item>
      <title>Re: changing from a date format "mm/dd/yyyy" to character format "mmddyyyy"</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/changing-from-a-date-format-quot-mm-dd-yyyy-quot-to-character/m-p/87941#M608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Linlin, thanks! &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&amp;nbsp; it's perfect.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2012 15:58:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/changing-from-a-date-format-quot-mm-dd-yyyy-quot-to-character/m-p/87941#M608</guid>
      <dc:creator>Cyndia</dc:creator>
      <dc:date>2012-04-18T15:58:04Z</dc:date>
    </item>
    <item>
      <title>Re: changing from a date format "mm/dd/yyyy" to character format "mmddyyyy"</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/changing-from-a-date-format-quot-mm-dd-yyyy-quot-to-character/m-p/87942#M609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the date converted mmddyyyyy seems to be still numeric.&amp;nbsp; is there a way to change it to &lt;STRONG&gt;&lt;SPAN style="text-decoration: underline;"&gt;Character mmddyyyy&lt;/SPAN&gt; &lt;/STRONG&gt;?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i tried&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ndob=put(dob, $8.);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the ndob became negative number that does not look like a date any more.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2012 16:15:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/changing-from-a-date-format-quot-mm-dd-yyyy-quot-to-character/m-p/87942#M609</guid>
      <dc:creator>Cyndia</dc:creator>
      <dc:date>2012-04-18T16:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: changing from a date format "mm/dd/yyyy" to character format "mmddyyyy"</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/changing-from-a-date-format-quot-mm-dd-yyyy-quot-to-character/m-p/87943#M610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please post the complete code that you have run. LinLin' code meets your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2012 16:18:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/changing-from-a-date-format-quot-mm-dd-yyyy-quot-to-character/m-p/87943#M610</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2012-04-18T16:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: changing from a date format "mm/dd/yyyy" to character format "mmddyyyy"</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/changing-from-a-date-format-quot-mm-dd-yyyy-quot-to-character/m-p/87944#M611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data xyz2;&lt;/P&gt;&lt;P&gt;set xyz1;&lt;/P&gt;&lt;P&gt; format olddate mmddyyn.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: none repeat scroll 0% 0% white; color: black; font-size: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: none repeat scroll 0% 0% white; color: black; font-size: 12pt;"&gt;/*Now the olddate changed from mm/dd/yyyy to mmddyyyy in new dataset xyz2&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: none repeat scroll 0% 0% white; color: black; font-size: 12pt;"&gt;but the variable type is still numeric.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: none repeat scroll 0% 0% white; color: black; font-size: 12pt;"&gt;the question is how to change the mmddyyyy to character type? */&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* i tried the following to change oldate to a new column named newdate and change it to character type, but newdate became negative value that does not look like a date but a number only.&amp;nbsp; how to make mmddyyyy from numeric to characters mmddyyyy?&amp;nbsp;&amp;nbsp; */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;newdate=put(olddate, $8.);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2012 16:27:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/changing-from-a-date-format-quot-mm-dd-yyyy-quot-to-character/m-p/87944#M611</guid>
      <dc:creator>Cyndia</dc:creator>
      <dc:date>2012-04-18T16:27:43Z</dc:date>
    </item>
    <item>
      <title>Re: changing from a date format "mm/dd/yyyy" to character format "mmddyyyy"</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/changing-from-a-date-format-quot-mm-dd-yyyy-quot-to-character/m-p/87945#M612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this, btw, LinLin already has this in her code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;newdate=put(olddate, mmddyyn.);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first format you used is just a format change, not a type change, so olddate will still be the way it is, numeric. You need to involve a new variable ( you have tried) to fix this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2012 16:40:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/changing-from-a-date-format-quot-mm-dd-yyyy-quot-to-character/m-p/87945#M612</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2012-04-18T16:40:56Z</dc:date>
    </item>
    <item>
      <title>Re: changing from a date format "mm/dd/yyyy" to character format "mmddyyyy"</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/changing-from-a-date-format-quot-mm-dd-yyyy-quot-to-character/m-p/87946#M613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the following works:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data xyz2;&lt;/P&gt;&lt;P&gt;set xyz1;&lt;/P&gt;&lt;P&gt;newdate=put(olddate, mmddyyn.);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2012 17:13:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/changing-from-a-date-format-quot-mm-dd-yyyy-quot-to-character/m-p/87946#M613</guid>
      <dc:creator>Cyndia</dc:creator>
      <dc:date>2012-04-18T17:13:04Z</dc:date>
    </item>
  </channel>
</rss>

