<?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 Substract date variable which is in character in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Substract-date-variable-which-is-in-character/m-p/504309#M134937</link>
    <description>&lt;P&gt;I've the date variable as follows and it is in character. Based on this field I've to create the new field (KNDEIND) and it should be in character and the rule for the new field is PODVERD-1. Could you please help me understand how can I achieve this in one step?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="212"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="100"&gt;PODVERD&lt;/TD&gt;
&lt;TD width="112"&gt;KNDEIND&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;2017-11-25&lt;/TD&gt;
&lt;TD&gt;2017-11-24&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
    <pubDate>Mon, 15 Oct 2018 14:01:38 GMT</pubDate>
    <dc:creator>Babloo</dc:creator>
    <dc:date>2018-10-15T14:01:38Z</dc:date>
    <item>
      <title>Substract date variable which is in character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Substract-date-variable-which-is-in-character/m-p/504309#M134937</link>
      <description>&lt;P&gt;I've the date variable as follows and it is in character. Based on this field I've to create the new field (KNDEIND) and it should be in character and the rule for the new field is PODVERD-1. Could you please help me understand how can I achieve this in one step?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="212"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="100"&gt;PODVERD&lt;/TD&gt;
&lt;TD width="112"&gt;KNDEIND&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;2017-11-25&lt;/TD&gt;
&lt;TD&gt;2017-11-24&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Mon, 15 Oct 2018 14:01:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Substract-date-variable-which-is-in-character/m-p/504309#M134937</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2018-10-15T14:01:38Z</dc:date>
    </item>
    <item>
      <title>Re: Substract date variable which is in character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Substract-date-variable-which-is-in-character/m-p/504311#M134938</link>
      <description>&lt;P&gt;If you would store dates as SAS intended, you could simply use:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;KNDEIND = PODVERD - 1;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, since the requirement is to use character dates, you need to jump through a couple of hoops:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;KNDEIND = put(input(podverd, yymmdd10.) - 1, yymmddd10.);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Oct 2018 14:08:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Substract-date-variable-which-is-in-character/m-p/504311#M134938</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-10-15T14:08:33Z</dc:date>
    </item>
    <item>
      <title>Re: Substract date variable which is in character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Substract-date-variable-which-is-in-character/m-p/504312#M134939</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/8409"&gt;@Babloo&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I see that you have over 700 posts to the sas forums, and are labelled a "PROC STAR". I feel that I (and others) are the object of (let's say) a distinct lack&amp;nbsp; of effort.&amp;nbsp; Your question is not even accompanied by a report of your own efforts to solve the problem.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Oct 2018 14:09:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Substract-date-variable-which-is-in-character/m-p/504312#M134939</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2018-10-15T14:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: Substract date variable which is in character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Substract-date-variable-which-is-in-character/m-p/504319#M134942</link>
      <description>&lt;P&gt;I 2nd&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/31461"&gt;@mkeintz&lt;/a&gt; response!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Oct 2018 14:19:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Substract-date-variable-which-is-in-character/m-p/504319#M134942</guid>
      <dc:creator>VDD</dc:creator>
      <dc:date>2018-10-15T14:19:01Z</dc:date>
    </item>
    <item>
      <title>Re: Substract date variable which is in character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Substract-date-variable-which-is-in-character/m-p/504330#M134944</link>
      <description>&lt;P&gt;Since subtraction is generally not a character function, or at least folks don't have a universal standard of what it would mean, the obvious bit is turn it into a numeric, do the subtraction or data adjustment and then put the numeric to a character.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;kndeind= put ( intnx('day',input(podverd,yymmdd10.),-1),yymmddd10.);&lt;/P&gt;</description>
      <pubDate>Mon, 15 Oct 2018 14:27:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Substract-date-variable-which-is-in-character/m-p/504330#M134944</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-10-15T14:27:07Z</dc:date>
    </item>
  </channel>
</rss>

