<?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 Last week day before the date in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Last-week-day-before-the-date/m-p/900273#M355804</link>
    <description>&lt;P&gt;Hello Experts,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a question : if my date is, for example,&amp;nbsp;'15Jan2021:0:0:0'dt, and I would like to find the last friday before this date, there is some function in SAS ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much !&lt;/P&gt;</description>
    <pubDate>Fri, 27 Oct 2023 07:50:01 GMT</pubDate>
    <dc:creator>SASdevAnneMarie</dc:creator>
    <dc:date>2023-10-27T07:50:01Z</dc:date>
    <item>
      <title>Last week day before the date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Last-week-day-before-the-date/m-p/900273#M355804</link>
      <description>&lt;P&gt;Hello Experts,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a question : if my date is, for example,&amp;nbsp;'15Jan2021:0:0:0'dt, and I would like to find the last friday before this date, there is some function in SAS ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much !&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2023 07:50:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Last-week-day-before-the-date/m-p/900273#M355804</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2023-10-27T07:50:01Z</dc:date>
    </item>
    <item>
      <title>Re: Last week day before the date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Last-week-day-before-the-date/m-p/900282#M355808</link>
      <description>&lt;P&gt;Please run the code below and see if that works for you.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data work.have;
   input mydate:datetime15.;
datalines;
15Jan2020:0:0:0
15Jan2021:0:0:0
15Jan2022:0:0:0
15Jan2023:0:0:0
19Oct2023:0:0:0
20Oct2023:0:0:0
21Oct2023:0:0:0
;
run;
   
data want;
   set have;
   thisweekFriday = intnx('week.6', datepart(mydate), 0);
   lastweekFriday = intnx('week.6', datepart(mydate), -1);
   format mydate datetime18. thisweekFriday lastweekFriday date9.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 27 Oct 2023 09:39:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Last-week-day-before-the-date/m-p/900282#M355808</guid>
      <dc:creator>JosvanderVelden</dc:creator>
      <dc:date>2023-10-27T09:39:39Z</dc:date>
    </item>
    <item>
      <title>Re: Last week day before the date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Last-week-day-before-the-date/m-p/900284#M355810</link>
      <description>Thank you very much !</description>
      <pubDate>Fri, 27 Oct 2023 09:47:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Last-week-day-before-the-date/m-p/900284#M355810</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2023-10-27T09:47:57Z</dc:date>
    </item>
    <item>
      <title>Re: Last week day before the date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Last-week-day-before-the-date/m-p/900297#M355811</link>
      <description>&lt;P&gt;I am confused as the title and text do not agree. In one case you ask for last weekday, and in the other case you ask for last Friday. These are not the same. Which do you really want?&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2023 10:02:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Last-week-day-before-the-date/m-p/900297#M355811</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-10-27T10:02:09Z</dc:date>
    </item>
    <item>
      <title>Re: Last week day before the date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Last-week-day-before-the-date/m-p/900298#M355812</link>
      <description>Sorry, It is actually day (friday) of last week before the date.</description>
      <pubDate>Fri, 27 Oct 2023 10:05:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Last-week-day-before-the-date/m-p/900298#M355812</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2023-10-27T10:05:27Z</dc:date>
    </item>
  </channel>
</rss>

