<?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: calculate the end_date using start date in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/calculate-the-end-date-using-start-date/m-p/722078#M223863</link>
    <description>&lt;P&gt;1) A date like '9999-99-99' is not a valid date. You can either assign value as '9999-12-31' or keep a separate variable for indication (1 or 0);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2) It is not clear when the end_dt should be assigned as '9999-99-99' and when to skip to next following observation(s) or how and when to compute the end_dt.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 26 Feb 2021 09:34:55 GMT</pubDate>
    <dc:creator>Shmuel</dc:creator>
    <dc:date>2021-02-26T09:34:55Z</dc:date>
    <item>
      <title>calculate the end_date using start date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calculate-the-end-date-using-start-date/m-p/722073#M223861</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;Thanks In advance&lt;/P&gt;&lt;P&gt;I need to calculate the end_date using start date.&lt;/P&gt;&lt;P&gt;The date columns is in date format.&lt;/P&gt;&lt;P&gt;I want to calculate the end_date on basis of id and term_month_begin and term_month_end.&lt;/P&gt;&lt;P&gt;Pease help me to get data correctly&lt;/P&gt;&lt;P&gt;input dataset&lt;BR /&gt;------------------------&lt;/P&gt;&lt;P&gt;id Term_month_begin Term_Month_end Start_dt&lt;BR /&gt;1 6 6 2011-01-04&lt;BR /&gt;1 12 12 2011-01-04&lt;BR /&gt;2 3 3 2011-01-04&lt;BR /&gt;2 3 3 2016-02-04&lt;BR /&gt;2 6 6 2017-02-03&lt;BR /&gt;2 6 6 2018-02-01&lt;/P&gt;&lt;P&gt;output I want&lt;BR /&gt;------------------&lt;BR /&gt;id Term_month_begin Term_Month_end Start_dt end_dt&lt;BR /&gt;1 6 6 2011-01-04 9999-99-99&lt;BR /&gt;1 12 12 2011-01-04 9999-99-99&lt;BR /&gt;2 3 3 2011-01-04 2016-02-03&lt;BR /&gt;2 3 3 2016-02-04 9999-99-99&lt;BR /&gt;2 6 6 2017-02-03 2017-12-31&lt;BR /&gt;2 6 6 2018-02-01 9999-99-99&lt;/P&gt;</description>
      <pubDate>Fri, 26 Feb 2021 08:44:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calculate-the-end-date-using-start-date/m-p/722073#M223861</guid>
      <dc:creator>hema_bhure</dc:creator>
      <dc:date>2021-02-26T08:44:27Z</dc:date>
    </item>
    <item>
      <title>Re: calculate the end_date using start date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calculate-the-end-date-using-start-date/m-p/722078#M223863</link>
      <description>&lt;P&gt;1) A date like '9999-99-99' is not a valid date. You can either assign value as '9999-12-31' or keep a separate variable for indication (1 or 0);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2) It is not clear when the end_dt should be assigned as '9999-99-99' and when to skip to next following observation(s) or how and when to compute the end_dt.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Feb 2021 09:34:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calculate-the-end-date-using-start-date/m-p/722078#M223863</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2021-02-26T09:34:55Z</dc:date>
    </item>
    <item>
      <title>Re: calculate the end_date using start date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calculate-the-end-date-using-start-date/m-p/722109#M223871</link>
      <description>hank you Shumuel, but i need to calculate other date apart from 9999-99-99. I have tried lag function but not getting proper output</description>
      <pubDate>Fri, 26 Feb 2021 11:45:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calculate-the-end-date-using-start-date/m-p/722109#M223871</guid>
      <dc:creator>hema_bhure</dc:creator>
      <dc:date>2021-02-26T11:45:28Z</dc:date>
    </item>
    <item>
      <title>Re: calculate the end_date using start date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calculate-the-end-date-using-start-date/m-p/722122#M223873</link>
      <description>&lt;P&gt;But you haven't explained how to determine when you want 9999-99-99.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You also haven't explained how to compute END_DT when it is not 9999-99-99.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Feb 2021 12:38:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calculate-the-end-date-using-start-date/m-p/722122#M223873</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-02-26T12:38:59Z</dc:date>
    </item>
  </channel>
</rss>

