<?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 obtain previous date in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-obtain-previous-date/m-p/813558#M321108</link>
    <description>&lt;P&gt;hello&lt;/P&gt;
&lt;P&gt;I want to obtain the previous date. my date format is&amp;nbsp;YYMMN6.&lt;/P&gt;
&lt;P&gt;for example I have 201501, I want that the program give the previous month 201412&lt;/P&gt;
&lt;P&gt;thanks&lt;/P&gt;</description>
    <pubDate>Mon, 16 May 2022 18:30:51 GMT</pubDate>
    <dc:creator>sasphd</dc:creator>
    <dc:date>2022-05-16T18:30:51Z</dc:date>
    <item>
      <title>how to obtain previous date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-obtain-previous-date/m-p/813558#M321108</link>
      <description>&lt;P&gt;hello&lt;/P&gt;
&lt;P&gt;I want to obtain the previous date. my date format is&amp;nbsp;YYMMN6.&lt;/P&gt;
&lt;P&gt;for example I have 201501, I want that the program give the previous month 201412&lt;/P&gt;
&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Mon, 16 May 2022 18:30:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-obtain-previous-date/m-p/813558#M321108</guid>
      <dc:creator>sasphd</dc:creator>
      <dc:date>2022-05-16T18:30:51Z</dc:date>
    </item>
    <item>
      <title>Re: how to obtain previous date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-obtain-previous-date/m-p/813563#M321113</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
    set have;
    previous_date=intnx('month',date,-1,'b');
    format previous_date yymmn6.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All month arithmetic should be done with INTNX function (or in some situations the INTCK function). SAS has done the hard work to do month arithmetic, so you don't have to.&lt;/P&gt;</description>
      <pubDate>Mon, 16 May 2022 18:49:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-obtain-previous-date/m-p/813563#M321113</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-05-16T18:49:45Z</dc:date>
    </item>
  </channel>
</rss>

