<?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 Trimming dates to yyyy only in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Trimming-dates-to-yyyy-only/m-p/142831#M37997</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How can I reformat a date from mmmyy7. to yyyy only? &lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;The data set I’m working in has multiple years of data. I want to strip/trim the ddMMM from the YYYY, i.e. leaving on the YYYY.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Woody Sutton&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Jun 2014 01:34:58 GMT</pubDate>
    <dc:creator>Woody_UNCW</dc:creator>
    <dc:date>2014-06-16T01:34:58Z</dc:date>
    <item>
      <title>Trimming dates to yyyy only</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Trimming-dates-to-yyyy-only/m-p/142831#M37997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How can I reformat a date from mmmyy7. to yyyy only? &lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;The data set I’m working in has multiple years of data. I want to strip/trim the ddMMM from the YYYY, i.e. leaving on the YYYY.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Woody Sutton&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2014 01:34:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Trimming-dates-to-yyyy-only/m-p/142831#M37997</guid>
      <dc:creator>Woody_UNCW</dc:creator>
      <dc:date>2014-06-16T01:34:58Z</dc:date>
    </item>
    <item>
      <title>Re: Trimming dates to yyyy only</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Trimming-dates-to-yyyy-only/m-p/142832#M37998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;data x;
 x='01jan2012'd;
 format x year4.;
 run;


&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Xia Keshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2014 02:18:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Trimming-dates-to-yyyy-only/m-p/142832#M37998</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2014-06-16T02:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: Trimming dates to yyyy only</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Trimming-dates-to-yyyy-only/m-p/142833#M37999</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;/P&gt;&lt;P&gt;Or:&lt;/P&gt;&lt;P&gt;data x;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x='01jan2012'd;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y=year(x);&lt;/P&gt;&lt;P&gt; run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2014 07:59:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Trimming-dates-to-yyyy-only/m-p/142833#M37999</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-06-16T07:59:52Z</dc:date>
    </item>
    <item>
      <title>Re: Trimming dates to yyyy only</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Trimming-dates-to-yyyy-only/m-p/142834#M38000</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually with SAS dates I wouldn't change any values unless you want to add a new variable to a data set. Most analysis functions will use a formatted value and in your case that format would be YEAR4. when you need it. If you modify the date value I would bet that in short order someone will want quarterly or monthly summaries. Which with the original date value means you likely only have to change ther format to one appropriate. You don't even have to make the format change permanent, use at run time. However Proc Datasets will let you change change the default format by code or open the dataset in the SAS explorer in column view, click on the variable and type the desired format in the format box.&lt;/P&gt;&lt;P&gt;To build a new variable: Year=year(datevalue);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2014 14:49:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Trimming-dates-to-yyyy-only/m-p/142834#M38000</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2014-06-16T14:49:54Z</dc:date>
    </item>
    <item>
      <title>Re: Trimming dates to yyyy only</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Trimming-dates-to-yyyy-only/m-p/142835#M38001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you all for your help. i was successful in formatting the data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2014 14:57:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Trimming-dates-to-yyyy-only/m-p/142835#M38001</guid>
      <dc:creator>Woody_UNCW</dc:creator>
      <dc:date>2014-06-16T14:57:36Z</dc:date>
    </item>
  </channel>
</rss>

