<?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 Year to a Date Macro in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Add-a-Year-to-a-Date-Macro/m-p/236097#M43226</link>
    <description>&lt;P&gt;Is there any particular reason you call a datetime value a date?&lt;/P&gt;</description>
    <pubDate>Mon, 23 Nov 2015 21:16:03 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2015-11-23T21:16:03Z</dc:date>
    <item>
      <title>Add a Year to a Date Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Add-a-Year-to-a-Date-Macro/m-p/236090#M43220</link>
      <description>&lt;P&gt;I have a macro like:&lt;/P&gt;&lt;P&gt;%let startYear = '1Jul2015:0:0:0'dt;&lt;/P&gt;&lt;P&gt;How can I add a year to the macro? All the examples I have seen have added a year in the dataset rather than the macro.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2015 20:45:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Add-a-Year-to-a-Date-Macro/m-p/236090#M43220</guid>
      <dc:creator>DavidPhillips2</dc:creator>
      <dc:date>2015-11-23T20:45:04Z</dc:date>
    </item>
    <item>
      <title>Re: Add a Year to a Date Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Add-a-Year-to-a-Date-Macro/m-p/236093#M43223</link>
      <description>&lt;P&gt;I don't understand the question. Your example already has a year in it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(And we're talking about a macro variable, not a macro, right?)&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2015 20:50:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Add-a-Year-to-a-Date-Macro/m-p/236093#M43223</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2015-11-23T20:50:13Z</dc:date>
    </item>
    <item>
      <title>Re: Add a Year to a Date Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Add-a-Year-to-a-Date-Macro/m-p/236094#M43224</link>
      <description>&lt;P&gt;How can I increment a macro variable by one year?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2015 20:52:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Add-a-Year-to-a-Date-Macro/m-p/236094#M43224</guid>
      <dc:creator>DavidPhillips2</dc:creator>
      <dc:date>2015-11-23T20:52:14Z</dc:date>
    </item>
    <item>
      <title>Re: Add a Year to a Date Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Add-a-Year-to-a-Date-Macro/m-p/236095#M43225</link>
      <description>&lt;P&gt;Oh, duh, that should have been obvious but I guess I misread your question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let incr_by_one_year=%sysfunc(intnx(dtyear,&amp;amp;startyear,1,s));&lt;/P&gt;
&lt;P&gt;%put incr_by_one_year %sysfunc(putn(&amp;amp;incr_by_one_year,datetime16.));&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2015 21:10:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Add-a-Year-to-a-Date-Macro/m-p/236095#M43225</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2015-11-23T21:10:42Z</dc:date>
    </item>
    <item>
      <title>Re: Add a Year to a Date Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Add-a-Year-to-a-Date-Macro/m-p/236097#M43226</link>
      <description>&lt;P&gt;Is there any particular reason you call a datetime value a date?&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2015 21:16:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Add-a-Year-to-a-Date-Macro/m-p/236097#M43226</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-11-23T21:16:03Z</dc:date>
    </item>
    <item>
      <title>Re: Add a Year to a Date Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Add-a-Year-to-a-Date-Macro/m-p/236098#M43227</link>
      <description>&lt;P&gt;date would be better&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2015 21:17:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Add-a-Year-to-a-Date-Macro/m-p/236098#M43227</guid>
      <dc:creator>DavidPhillips2</dc:creator>
      <dc:date>2015-11-23T21:17:36Z</dc:date>
    </item>
    <item>
      <title>Re: Add a Year to a Date Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Add-a-Year-to-a-Date-Macro/m-p/236107#M43233</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let startYear ="1Jul2015:0:0:0"dt;
%let newstarYear=%sysfunc(putn(%sysfunc(intnx(dtyear,&amp;amp;startYear,1,s)),datetime19.));
%put &amp;amp;newstarYear;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 23 Nov 2015 21:58:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Add-a-Year-to-a-Date-Macro/m-p/236107#M43233</guid>
      <dc:creator>slchen</dc:creator>
      <dc:date>2015-11-23T21:58:32Z</dc:date>
    </item>
    <item>
      <title>Re: Add a Year to a Date Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Add-a-Year-to-a-Date-Macro/m-p/236159#M43251</link>
      <description>&lt;P&gt;Personally I would never use macro varaibles (which are text) for manpulating or using date/time numeric data. &amp;nbsp;I would put them in a parameters dataset, and call them up when needed. &amp;nbsp;Two beneifts, you can manipulate them using the full simple syntax of base SAS, and they are accessible in numerous manners (i.e. call symput, join/merge, call execute).&lt;/P&gt;</description>
      <pubDate>Tue, 24 Nov 2015 09:58:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Add-a-Year-to-a-Date-Macro/m-p/236159#M43251</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-11-24T09:58:22Z</dc:date>
    </item>
  </channel>
</rss>

