<?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: Time series in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Time-series/m-p/464151#M285068</link>
    <description>&lt;P&gt;If yearMonth is a number then convert to a SAS date with&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;ymDT = mdy(mod(YearMonth,100), 1, int(YearMonth/100)); &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;format ymDT yymmd.;&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 22 May 2018 19:10:33 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2018-05-22T19:10:33Z</dc:date>
    <item>
      <title>Time series</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Time-series/m-p/464096#M285064</link>
      <description>&lt;P&gt;Is there an easy way to convert a combined year and month value to a SAS DATE?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following data, and wanted to use some of the SAS Time Series methods&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is a number for year, but it also has a two digit number for month combined. The data are in an Excel format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is asample of the data:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The first variable is January in the year 1895. PCP is the total precipitation for that month.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;YearMonth&amp;nbsp; &amp;nbsp; &amp;nbsp; PCP&lt;/P&gt;&lt;P&gt;189501&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;6.89&lt;/P&gt;&lt;P&gt;189502&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2.94&lt;/P&gt;&lt;P&gt;189503&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5.66&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;The data go up to December 2017.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to be able to total up all the PCP for a year, plot it -- then plot the next year’s total PCP, etc all the way up to 2017.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 May 2018 15:21:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Time-series/m-p/464096#M285064</guid>
      <dc:creator>dennis_e</dc:creator>
      <dc:date>2018-05-22T15:21:51Z</dc:date>
    </item>
    <item>
      <title>Re: Time series</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Time-series/m-p/464103#M285065</link>
      <description>&lt;P&gt;may this demo help?&amp;nbsp; Mind you! ---The sasdate value will revert to first of the month though&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input YearMonth      PCP;
cards;
189501           6.89
189502           2.94
189503           5.66
;

data want;
set have;
k=put(YearMonth,8. -l);
sasdate=input(k,yymmn6.);
format sasdate date9.;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 May 2018 15:32:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Time-series/m-p/464103#M285065</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-05-22T15:32:49Z</dc:date>
    </item>
    <item>
      <title>Re: Time series</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Time-series/m-p/464104#M285066</link>
      <description>&lt;P&gt;or just:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input YearMonth      PCP;
cards;
189501           6.89
189502           2.94
189503           5.66
;

data want;
set have;
sasdate=input(put(YearMonth,8. -l),yymmn6.);
format sasdate date9.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 22 May 2018 15:30:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Time-series/m-p/464104#M285066</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-05-22T15:30:57Z</dc:date>
    </item>
    <item>
      <title>Re: Time series</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Time-series/m-p/464115#M285067</link>
      <description>Thank you -- Can't wait to try this later.</description>
      <pubDate>Tue, 22 May 2018 15:51:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Time-series/m-p/464115#M285067</guid>
      <dc:creator>dennis_e</dc:creator>
      <dc:date>2018-05-22T15:51:26Z</dc:date>
    </item>
    <item>
      <title>Re: Time series</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Time-series/m-p/464151#M285068</link>
      <description>&lt;P&gt;If yearMonth is a number then convert to a SAS date with&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;ymDT = mdy(mod(YearMonth,100), 1, int(YearMonth/100)); &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;format ymDT yymmd.;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 May 2018 19:10:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Time-series/m-p/464151#M285068</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2018-05-22T19:10:33Z</dc:date>
    </item>
    <item>
      <title>Re: Time series</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Time-series/m-p/464859#M285069</link>
      <description>Thank you.</description>
      <pubDate>Thu, 24 May 2018 17:54:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Time-series/m-p/464859#M285069</guid>
      <dc:creator>dennis_e</dc:creator>
      <dc:date>2018-05-24T17:54:30Z</dc:date>
    </item>
  </channel>
</rss>

