<?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 change de format of a SAS DATE in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-change-de-format-of-a-SAS-DATE/m-p/121463#M10057</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dominic,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to change your date directly to month, this is the code.&lt;/P&gt;&lt;P&gt;data one;&lt;/P&gt;&lt;P&gt;input date:datetime22.;&lt;/P&gt;&lt;P&gt;Month_of_your_date=month(datepart(date));&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;26NOV2010:00:00:00.000&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Nov 2012 19:55:36 GMT</pubDate>
    <dc:creator>SOORISAS</dc:creator>
    <dc:date>2012-11-08T19:55:36Z</dc:date>
    <item>
      <title>How to change de format of a SAS DATE</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-change-de-format-of-a-SAS-DATE/m-p/121461#M10055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a data set (data_set11) where the format of a variable (Decision_Date) is: 26NOV2010:00:00:00.000.&lt;/P&gt;&lt;P&gt;I would like to change it to 2010/11/26 AND extract the month (11).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Nov 2012 18:10:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-change-de-format-of-a-SAS-DATE/m-p/121461#M10055</guid>
      <dc:creator>dominicrb</dc:creator>
      <dc:date>2012-11-08T18:10:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to change de format of a SAS DATE</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-change-de-format-of-a-SAS-DATE/m-p/121462#M10056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The value example you display means the variable is likely a DATETIME variable unless it is character, in which formats won't help a lot.&lt;/P&gt;&lt;P&gt;If it is datetime, there are limited SAS supplied formats but E8601DA10. or E8601DN10. come closest depending on whther you want single digit months and days to appear with a leading 0. There will be - instead of /&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or convert it to an actual date as Decision_date= datepart(Decision_date);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want a new variable then&lt;/P&gt;&lt;P&gt;month=month(datepart(Decision_date)); If you converted it to a date as above then&lt;/P&gt;&lt;P&gt;month= month(Decision_date);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Nov 2012 18:28:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-change-de-format-of-a-SAS-DATE/m-p/121462#M10056</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2012-11-08T18:28:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to change de format of a SAS DATE</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-change-de-format-of-a-SAS-DATE/m-p/121463#M10057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dominic,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to change your date directly to month, this is the code.&lt;/P&gt;&lt;P&gt;data one;&lt;/P&gt;&lt;P&gt;input date:datetime22.;&lt;/P&gt;&lt;P&gt;Month_of_your_date=month(datepart(date));&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;26NOV2010:00:00:00.000&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Nov 2012 19:55:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-change-de-format-of-a-SAS-DATE/m-p/121463#M10057</guid>
      <dc:creator>SOORISAS</dc:creator>
      <dc:date>2012-11-08T19:55:36Z</dc:date>
    </item>
  </channel>
</rss>

