<?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: remove timestamp from a macro in a let statement in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/remove-timestamp-from-a-macro-in-a-let-statement/m-p/429626#M27708</link>
    <description>Thanks a lot!</description>
    <pubDate>Mon, 22 Jan 2018 14:40:26 GMT</pubDate>
    <dc:creator>ak2</dc:creator>
    <dc:date>2018-01-22T14:40:26Z</dc:date>
    <item>
      <title>remove timestamp from a macro in a let statement</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/remove-timestamp-from-a-macro-in-a-let-statement/m-p/429615#M27706</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;
&lt;P&gt;I have a macro variable&amp;nbsp;that is&amp;nbsp;datetime. How can I remove the time stamp from the variable in a new let-statement?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have this macro:&lt;/P&gt;
&lt;P&gt;%let date0='22jan2018:0:0:0'dt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to make a new macro like this:&lt;/P&gt;
&lt;P&gt;%let date1=datepart(&amp;amp;date0.);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have tried statements like this, but I can't get it to work:&lt;/P&gt;
&lt;P&gt;%let date1=%sysfunc(datepart(&amp;amp;date0.))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does anyone know how to convert &amp;amp;date0. into just a date-variable?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2018 14:22:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/remove-timestamp-from-a-macro-in-a-let-statement/m-p/429615#M27706</guid>
      <dc:creator>ak2</dc:creator>
      <dc:date>2018-01-22T14:22:04Z</dc:date>
    </item>
    <item>
      <title>Re: remove timestamp from a macro in a let statement</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/remove-timestamp-from-a-macro-in-a-let-statement/m-p/429625#M27707</link>
      <description>&lt;P&gt;It does work!&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let date0='22jan2018:0:0:0'dt;
%let date1=%sysfunc(datepart(&amp;amp;date0.));

%put &amp;amp;date1.;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;See the log:&lt;/P&gt;
&lt;PRE&gt;24         %let date0='22jan2018:0:0:0'dt;
25         %let date1=%sysfunc(datepart(&amp;amp;date0.));
26         
27         %put &amp;amp;date1.;
21206
&lt;/PRE&gt;
&lt;P&gt;21206 is the raw numeric value for today's date, and can be used as-is in calculations and comparisons.&lt;/P&gt;
&lt;P&gt;You only need to use a format for displaying the value.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2018 14:36:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/remove-timestamp-from-a-macro-in-a-let-statement/m-p/429625#M27707</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-01-22T14:36:10Z</dc:date>
    </item>
    <item>
      <title>Re: remove timestamp from a macro in a let statement</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/remove-timestamp-from-a-macro-in-a-let-statement/m-p/429626#M27708</link>
      <description>Thanks a lot!</description>
      <pubDate>Mon, 22 Jan 2018 14:40:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/remove-timestamp-from-a-macro-in-a-let-statement/m-p/429626#M27708</guid>
      <dc:creator>ak2</dc:creator>
      <dc:date>2018-01-22T14:40:26Z</dc:date>
    </item>
  </channel>
</rss>

