<?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 how to subtract weeks from date in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/how-to-subtract-weeks-from-date/m-p/743081#M29227</link>
    <description>&lt;P&gt;How do you subtract weeks from a given date? how can i code that&lt;/P&gt;
&lt;P&gt;for example I have a data with a date (date1 ) and I want to subtract 36 weeks and get a new date (date2). please look the table below for example.&lt;/P&gt;
&lt;P&gt;date1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;date 2&lt;/P&gt;
&lt;P&gt;5/3/2012&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;8/25/2011&lt;/P&gt;
&lt;P&gt;6/4/2012&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 9/26/2011&lt;/P&gt;</description>
    <pubDate>Fri, 21 May 2021 23:13:32 GMT</pubDate>
    <dc:creator>hjjijkkl</dc:creator>
    <dc:date>2021-05-21T23:13:32Z</dc:date>
    <item>
      <title>how to subtract weeks from date</title>
      <link>https://communities.sas.com/t5/New-SAS-User/how-to-subtract-weeks-from-date/m-p/743081#M29227</link>
      <description>&lt;P&gt;How do you subtract weeks from a given date? how can i code that&lt;/P&gt;
&lt;P&gt;for example I have a data with a date (date1 ) and I want to subtract 36 weeks and get a new date (date2). please look the table below for example.&lt;/P&gt;
&lt;P&gt;date1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;date 2&lt;/P&gt;
&lt;P&gt;5/3/2012&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;8/25/2011&lt;/P&gt;
&lt;P&gt;6/4/2012&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 9/26/2011&lt;/P&gt;</description>
      <pubDate>Fri, 21 May 2021 23:13:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/how-to-subtract-weeks-from-date/m-p/743081#M29227</guid>
      <dc:creator>hjjijkkl</dc:creator>
      <dc:date>2021-05-21T23:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: how to subtract weeks from date</title>
      <link>https://communities.sas.com/t5/New-SAS-User/how-to-subtract-weeks-from-date/m-p/743082#M29228</link>
      <description>Meaning subtracting 36 weeks from date1 to get date 2</description>
      <pubDate>Fri, 21 May 2021 23:15:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/how-to-subtract-weeks-from-date/m-p/743082#M29228</guid>
      <dc:creator>hjjijkkl</dc:creator>
      <dc:date>2021-05-21T23:15:10Z</dc:date>
    </item>
    <item>
      <title>Re: how to subtract weeks from date</title>
      <link>https://communities.sas.com/t5/New-SAS-User/how-to-subtract-weeks-from-date/m-p/743104#M29232</link>
      <description>&lt;P&gt;Use the INTNX function with a 'week' interval.&lt;/P&gt;</description>
      <pubDate>Sat, 22 May 2021 07:30:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/how-to-subtract-weeks-from-date/m-p/743104#M29232</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-05-22T07:30:04Z</dc:date>
    </item>
    <item>
      <title>Re: how to subtract weeks from date</title>
      <link>https://communities.sas.com/t5/New-SAS-User/how-to-subtract-weeks-from-date/m-p/743111#M29233</link>
      <description>&lt;P&gt;Another way to do this is to suntract 36*7 from each date.&lt;/P&gt;</description>
      <pubDate>Sat, 22 May 2021 09:40:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/how-to-subtract-weeks-from-date/m-p/743111#M29233</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-05-22T09:40:47Z</dc:date>
    </item>
    <item>
      <title>Re: how to subtract weeks from date</title>
      <link>https://communities.sas.com/t5/New-SAS-User/how-to-subtract-weeks-from-date/m-p/743134#M29237</link>
      <description>&lt;P&gt;How many times has it been suggested to you to provide data in the form of a data step?&lt;/P&gt;
&lt;P&gt;For one thing, we need to know if the values are actually SAS data values or not.&lt;/P&gt;
&lt;P&gt;This shows adjusting a date by 36 weeks to the Same day of the week, Beginning of the week or End of the week.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data have;
   input date1 :mmddyy10.;
datalines;
5/3/2012      
6/4/2012
; 

data want;
   set have;
   date2= intnx('week',date1,-36,'s');
   date3= intnx('week',date1,-36,'b');
   date4= intnx('week',date1,-36,'e');
   format date: mmddyy10.;
run;&lt;/PRE&gt;</description>
      <pubDate>Sat, 22 May 2021 14:50:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/how-to-subtract-weeks-from-date/m-p/743134#M29237</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-05-22T14:50:18Z</dc:date>
    </item>
  </channel>
</rss>

