<?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: Date + number of month combination in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-number-of-month-combination/m-p/875360#M42940</link>
    <description>&lt;P&gt;Never mind. I found why. I did not assign the prompt to the query.&lt;/P&gt;</description>
    <pubDate>Thu, 11 May 2023 21:50:39 GMT</pubDate>
    <dc:creator>ralizadeh</dc:creator>
    <dc:date>2023-05-11T21:50:39Z</dc:date>
    <item>
      <title>Date + number of month combination</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-number-of-month-combination/m-p/875353#M42938</link>
      <description>&lt;P&gt;I want to write a CASE WHEN statement. I would like to use my prompt date that has an start date and end date. SAS EG will code it as "&amp;amp;DateRange_min"d and&amp;nbsp;"&amp;amp;DateRange_max"d. No need to think about the end date for this question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to choose those rows in my table that their dates are between "&amp;amp;DateRange_min"d and 12 month later.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example if&amp;nbsp;"&amp;amp;DateRange_min"d is 11/01/2021 then "&amp;amp;DateRange_min"d &lt;STRONG&gt;+&lt;/STRONG&gt; &lt;STRONG&gt;12&lt;/STRONG&gt; months should come out as 10/31/2022 (&lt;STRONG&gt;last day&lt;/STRONG&gt; of that month). I need any rows between these two dates (which easily can be done with CASE WHEN statement if I could figure out the end date). I need to make sure the codes would work properly when the&amp;nbsp;&lt;SPAN&gt;interval crosses the year boundary e.g. "&amp;amp;DateRange_min"d is in 2021, and 12 month later is another year e.g. 2022 &lt;/SPAN&gt;while also taking into consideration that not all months have the same number of days in them.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wrote the code below to first create a computed column in Query Builder that will&amp;nbsp;&lt;SPAN&gt;add 12 months to&amp;nbsp;"&amp;amp;DateRange_min"d, however I get an error. Any thought, why?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;intnx(month, &amp;amp;DateRange_min, 12, e)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;This is also failed&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;intnx(month, "&amp;amp;DateRange_min"d, 12, e)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2023 21:16:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-number-of-month-combination/m-p/875353#M42938</guid>
      <dc:creator>ralizadeh</dc:creator>
      <dc:date>2023-05-11T21:16:18Z</dc:date>
    </item>
    <item>
      <title>Re: Date + number of month combination</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-number-of-month-combination/m-p/875359#M42939</link>
      <description>&lt;P&gt;If you want an opinion as to why an error has happened then you really need to post the error and the code causing it from your SAS log.&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2023 21:39:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-number-of-month-combination/m-p/875359#M42939</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2023-05-11T21:39:29Z</dc:date>
    </item>
    <item>
      <title>Re: Date + number of month combination</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-number-of-month-combination/m-p/875360#M42940</link>
      <description>&lt;P&gt;Never mind. I found why. I did not assign the prompt to the query.&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2023 21:50:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-number-of-month-combination/m-p/875360#M42940</guid>
      <dc:creator>ralizadeh</dc:creator>
      <dc:date>2023-05-11T21:50:39Z</dc:date>
    </item>
  </channel>
</rss>

