<?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 Transformation in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Date-Transformation/m-p/565254#M158680</link>
    <description>&lt;P&gt;Welcome to the SAS Communities &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
    date='11jun2019'd;
    newdate=intnx('week.6',date,1);

    put date= mmddyy10. // newdate= mmddyy10.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 11 Jun 2019 14:18:38 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2019-06-11T14:18:38Z</dc:date>
    <item>
      <title>Date Transformation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-Transformation/m-p/565253#M158679</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to change a date to the Friday of that week. For example, if the date is 6/11/2019, I want the new one to be 6/14/2019. It can be created as a new variable or overwrite the old one it does not matter. If it helps, the old date variable is in the MMDDYY10. format.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2019 14:15:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-Transformation/m-p/565253#M158679</guid>
      <dc:creator>alexgouv</dc:creator>
      <dc:date>2019-06-11T14:15:22Z</dc:date>
    </item>
    <item>
      <title>Re: Date Transformation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-Transformation/m-p/565254#M158680</link>
      <description>&lt;P&gt;Welcome to the SAS Communities &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
    date='11jun2019'd;
    newdate=intnx('week.6',date,1);

    put date= mmddyy10. // newdate= mmddyy10.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 11 Jun 2019 14:18:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-Transformation/m-p/565254#M158680</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-06-11T14:18:38Z</dc:date>
    </item>
    <item>
      <title>Re: Date Transformation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-Transformation/m-p/565269#M158682</link>
      <description>&lt;P&gt;draycut,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the quick reply! I should have specified, but if the date is already a Friday I just want it to stay that date. The code you posted is causing Fridays to be displayed with the date of the following Friday.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2019 14:38:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-Transformation/m-p/565269#M158682</guid>
      <dc:creator>alexgouv</dc:creator>
      <dc:date>2019-06-11T14:38:04Z</dc:date>
    </item>
    <item>
      <title>Re: Date Transformation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-Transformation/m-p/565295#M158694</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;You just need to test if the original date is a Friday. Like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="calc_friday.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/30206i042A322763A5917A/image-size/large?v=v2&amp;amp;px=999" role="button" title="calc_friday.png" alt="calc_friday.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2019 15:34:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-Transformation/m-p/565295#M158694</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2019-06-11T15:34:25Z</dc:date>
    </item>
    <item>
      <title>Re: Date Transformation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-Transformation/m-p/565307#M158699</link>
      <description>&lt;P&gt;No problem &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
    date='11jun2019'd;
    if weekday(date)=6 then newdate=date;
    else newdate=intnx('week.6',date,1);

    put date= mmddyy10. // newdate= mmddyy10.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 11 Jun 2019 15:58:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-Transformation/m-p/565307#M158699</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-06-11T15:58:38Z</dc:date>
    </item>
    <item>
      <title>Re: Date Transformation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-Transformation/m-p/565519#M158798</link>
      <description>&lt;PRE&gt;data _null_;
    date='11jun2019'd;
    newdate=intnx('week.7',date,0,'e');

    put date= mmddyy10. // newdate= mmddyy10.;
run;&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Jun 2019 11:53:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-Transformation/m-p/565519#M158798</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2019-06-12T11:53:20Z</dc:date>
    </item>
  </channel>
</rss>

