<?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: Add a Column of months to time series  data set in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Add-a-Column-of-months-to-time-series-data-set/m-p/433008#M22797</link>
    <description>&lt;P&gt;It's almost certain that you would be better off constructing MONTH as a numeric variable taking on values 1 through 12.&amp;nbsp; That's fairly easy:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;set have;&lt;/P&gt;
&lt;P&gt;month + 1;&lt;/P&gt;
&lt;P&gt;if month = 13 then month = 1;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to print MONTH, and see it in a different form, you can always create a format.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc format;&lt;/P&gt;
&lt;P&gt;value mm 1='Jan' 2='Feb' 3='Mar' 4='Apr' 5='May' 6='Jun' 7='Jul' 8='Aug' 9='Sept' 10='Oct' 11='Nov' 12='Dec';&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then when printing, apply the format:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;format month mm.;&lt;/P&gt;</description>
    <pubDate>Thu, 01 Feb 2018 06:05:12 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2018-02-01T06:05:12Z</dc:date>
    <item>
      <title>Add a Column of months to time series  data set</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Add-a-Column-of-months-to-time-series-data-set/m-p/432997#M22796</link>
      <description>&lt;P&gt;I have a time series data set in excel, 60 rows, that I uploaded in SAS On Demand Studio.&amp;nbsp; I need to add a column for months containing&amp;nbsp; Jan through Dec.&amp;nbsp; Since 60 months, it means 5 years which means each month has to be written&amp;nbsp; 5 times.&amp;nbsp; For example Jan at&amp;nbsp; 1st row, then at 13th row, etc...and on.&amp;nbsp; I could go back to my excel file and do it and then upload into SAS the newly modified file.&amp;nbsp; I wonder if I could do this within SAS without deleting, modifying and uploading&amp;gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2018 04:28:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Add-a-Column-of-months-to-time-series-data-set/m-p/432997#M22796</guid>
      <dc:creator>Kboukaabar</dc:creator>
      <dc:date>2018-02-01T04:28:52Z</dc:date>
    </item>
    <item>
      <title>Re: Add a Column of months to time series  data set</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Add-a-Column-of-months-to-time-series-data-set/m-p/433008#M22797</link>
      <description>&lt;P&gt;It's almost certain that you would be better off constructing MONTH as a numeric variable taking on values 1 through 12.&amp;nbsp; That's fairly easy:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;set have;&lt;/P&gt;
&lt;P&gt;month + 1;&lt;/P&gt;
&lt;P&gt;if month = 13 then month = 1;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to print MONTH, and see it in a different form, you can always create a format.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc format;&lt;/P&gt;
&lt;P&gt;value mm 1='Jan' 2='Feb' 3='Mar' 4='Apr' 5='May' 6='Jun' 7='Jul' 8='Aug' 9='Sept' 10='Oct' 11='Nov' 12='Dec';&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then when printing, apply the format:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;format month mm.;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2018 06:05:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Add-a-Column-of-months-to-time-series-data-set/m-p/433008#M22797</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-02-01T06:05:12Z</dc:date>
    </item>
  </channel>
</rss>

