<?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: Reg Date in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Reg-Date/m-p/70417#M20253</link>
    <description>Hi.&lt;BR /&gt;
Since SAS dates are stored as number of days (beginning on day 0 which is january 1st, 1960), what you want to do is basically a substraction.&lt;BR /&gt;
The SAS function called TODAY() or DATE() -- both give the same result -- will deliver the exact date every day.&lt;BR /&gt;
[pre]Data a;&lt;BR /&gt;
input date ddmmyy10.;&lt;BR /&gt;
gap = TODAY() - date ;&lt;BR /&gt;
cards;&lt;BR /&gt;
05/02/2011&lt;BR /&gt;
run;[/pre]</description>
    <pubDate>Wed, 09 Feb 2011 09:39:58 GMT</pubDate>
    <dc:creator>Olivier</dc:creator>
    <dc:date>2011-02-09T09:39:58Z</dc:date>
    <item>
      <title>Reg Date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reg-Date/m-p/70416#M20252</link>
      <description>Hi i am having a date i should minus it from the todays date(sysdate)&lt;BR /&gt;
&lt;BR /&gt;
Data a;&lt;BR /&gt;
input date ddmmyy10.;&lt;BR /&gt;
cards;&lt;BR /&gt;
05/02/2011&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
for examples sysdate is 10/02/2011 then out put sholud be date=5 it should be automatic as the systemdate but not with today function</description>
      <pubDate>Wed, 09 Feb 2011 05:03:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reg-Date/m-p/70416#M20252</guid>
      <dc:creator>R_Win</dc:creator>
      <dc:date>2011-02-09T05:03:12Z</dc:date>
    </item>
    <item>
      <title>Re: Reg Date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reg-Date/m-p/70417#M20253</link>
      <description>Hi.&lt;BR /&gt;
Since SAS dates are stored as number of days (beginning on day 0 which is january 1st, 1960), what you want to do is basically a substraction.&lt;BR /&gt;
The SAS function called TODAY() or DATE() -- both give the same result -- will deliver the exact date every day.&lt;BR /&gt;
[pre]Data a;&lt;BR /&gt;
input date ddmmyy10.;&lt;BR /&gt;
gap = TODAY() - date ;&lt;BR /&gt;
cards;&lt;BR /&gt;
05/02/2011&lt;BR /&gt;
run;[/pre]</description>
      <pubDate>Wed, 09 Feb 2011 09:39:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reg-Date/m-p/70417#M20253</guid>
      <dc:creator>Olivier</dc:creator>
      <dc:date>2011-02-09T09:39:58Z</dc:date>
    </item>
    <item>
      <title>Re: Reg Date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reg-Date/m-p/70418#M20254</link>
      <description>Thanks for your reply but i want it my macro sysdate.</description>
      <pubDate>Thu, 10 Feb 2011 08:44:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reg-Date/m-p/70418#M20254</guid>
      <dc:creator>R_Win</dc:creator>
      <dc:date>2011-02-10T08:44:42Z</dc:date>
    </item>
    <item>
      <title>Re: Reg Date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reg-Date/m-p/70419#M20255</link>
      <description>Yes, you can code/use the SAS-maintained macro variable &amp;amp;SYSDATE using a date-constant technique:&lt;BR /&gt;
&lt;BR /&gt;
DATA _NULL_;&lt;BR /&gt;
TODAY = "&amp;amp;SYSDATE"D;&lt;BR /&gt;
PUT TODAY= DATE9.;&lt;BR /&gt;
RUN;&lt;BR /&gt;
&lt;BR /&gt;
Do consider that the SAS function TODAY() and using &amp;amp;SYSDATE as shown above are equivalent.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
Suggested Google advanced search argument, this topic / post:&lt;BR /&gt;
&lt;BR /&gt;
data step sysdate constant site:sas.com</description>
      <pubDate>Thu, 10 Feb 2011 13:52:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reg-Date/m-p/70419#M20255</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2011-02-10T13:52:43Z</dc:date>
    </item>
  </channel>
</rss>

