<?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: SAS Dates in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-Dates/m-p/229170#M41445</link>
    <description>&lt;P&gt;SAS dates are internally represented by a number, representing the number of days since Jan 1, 1960. It is best to leave this internal representation and use formats to change how the number appear. There is no need to convert to character along the way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So if you use format date9., you should see the date appear as you want. For example, in a data step, or in a PROC, use&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;format variablename date9.;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But beyond that, it's not clear what the problem is that you are facing. Can you show us the SAS code you are using?&lt;/P&gt;</description>
    <pubDate>Thu, 08 Oct 2015 19:00:03 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2015-10-08T19:00:03Z</dc:date>
    <item>
      <title>SAS Dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Dates/m-p/229169#M41444</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to convert a numeric sas variable (length 8, format yymmdd10.) to date9. format. Currently the dates look like 2004-07-14 and I would like them to look like 14JUL2004. I've tried converting to character and then back to numeric but I must be doing something wrong. Can someone write out the code for how I make this change?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks so much in advance!&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2015 18:44:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Dates/m-p/229169#M41444</guid>
      <dc:creator>sweetpeaindeed2</dc:creator>
      <dc:date>2015-10-08T18:44:30Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Dates/m-p/229170#M41445</link>
      <description>&lt;P&gt;SAS dates are internally represented by a number, representing the number of days since Jan 1, 1960. It is best to leave this internal representation and use formats to change how the number appear. There is no need to convert to character along the way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So if you use format date9., you should see the date appear as you want. For example, in a data step, or in a PROC, use&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;format variablename date9.;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But beyond that, it's not clear what the problem is that you are facing. Can you show us the SAS code you are using?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2015 19:00:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Dates/m-p/229170#M41445</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2015-10-08T19:00:03Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Dates/m-p/229183#M41449</link>
      <description>&lt;P&gt;It's not clear what the problem is because the solution is as easy as you were indicating. I was complicating the situation thinking I needed to transform the variable when you are right, all I needed to do was include the format statement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for helping me discover my mistake!&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2015 19:39:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Dates/m-p/229183#M41449</guid>
      <dc:creator>sweetpeaindeed2</dc:creator>
      <dc:date>2015-10-08T19:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Dates/m-p/229193#M41451</link>
      <description>&lt;P&gt;Then accept it as a solution please. This will mark this thread as answered.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2015 21:22:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Dates/m-p/229193#M41451</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2015-10-08T21:22:20Z</dc:date>
    </item>
  </channel>
</rss>

