<?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: Macro for todays date and time in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Macro-for-todays-date-and-time/m-p/578490#M13357</link>
    <description>&lt;P&gt;Take note of Maxim 28. In most cases, such macro variables need no format.&lt;/P&gt;</description>
    <pubDate>Thu, 01 Aug 2019 15:55:13 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2019-08-01T15:55:13Z</dc:date>
    <item>
      <title>Macro for todays date and time</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Macro-for-todays-date-and-time/m-p/578479#M13355</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I want to create macro for processing date with time something like&amp;nbsp;&lt;/P&gt;&lt;P&gt;%let processdt = %sysfunc(today(), datetimeformat);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%put &amp;amp;processdt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the output should be 2019-08-01&amp;nbsp;&lt;SPAN&gt;00:00:00.0&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2019 15:38:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Macro-for-todays-date-and-time/m-p/578479#M13355</guid>
      <dc:creator>meckarthik</dc:creator>
      <dc:date>2019-08-01T15:38:22Z</dc:date>
    </item>
    <item>
      <title>Re: Macro for todays date and time</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Macro-for-todays-date-and-time/m-p/578488#M13356</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;  
    dt=dhms(today(),0,0,0);;
    put dt= datetime18.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Aug 2019 15:53:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Macro-for-todays-date-and-time/m-p/578488#M13356</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-08-01T15:53:16Z</dc:date>
    </item>
    <item>
      <title>Re: Macro for todays date and time</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Macro-for-todays-date-and-time/m-p/578490#M13357</link>
      <description>&lt;P&gt;Take note of Maxim 28. In most cases, such macro variables need no format.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2019 15:55:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Macro-for-todays-date-and-time/m-p/578490#M13357</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-08-01T15:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: Macro for todays date and time</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Macro-for-todays-date-and-time/m-p/578493#M13358</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/275095"&gt;@meckarthik&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I want to create macro for processing date with time something like&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let processdt = %sysfunc(today(), datetimeformat);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%put &amp;amp;processdt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the output should be 2019-08-01&amp;nbsp;&lt;SPAN&gt;00:00:00.0&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;9    %put NOTE: %sysfunc(datetime(),E8601LX20);
NOTE:  2019-08-01T08:53:14

19   %put NOTE: %sysfunc(datetime(),E8601LX22.1);
NOTE:  2019-08-01T08:56:22.2
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Pretty close I think you need the T. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2019 15:58:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Macro-for-todays-date-and-time/m-p/578493#M13358</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2019-08-01T15:58:44Z</dc:date>
    </item>
    <item>
      <title>Re: Macro for todays date and time</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Macro-for-todays-date-and-time/m-p/578495#M13359</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data _null_;
processdt =datetime()-time();
/* write your call symputx here and store in global symbol table*/
put processdt=;
format processdt e8601dt25.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Aug 2019 16:10:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Macro-for-todays-date-and-time/m-p/578495#M13359</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-08-01T16:10:01Z</dc:date>
    </item>
    <item>
      <title>Re: Macro for todays date and time</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Macro-for-todays-date-and-time/m-p/578499#M13360</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
picture dtStamp (round) 
low - high = '%Y-%0m-%0d %0H:%0M:%0S.%s' (datatype=datetime);
run;

%put NOTE: %sysfunc(datetime(), dtStamp.);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Here's the roll your own format options, dtStamp is the format name.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/275095"&gt;@meckarthik&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I want to create macro for processing date with time something like&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let processdt = %sysfunc(today(), datetimeformat);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%put &amp;amp;processdt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the output should be 2019-08-01&amp;nbsp;&lt;SPAN&gt;00:00:00.0&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2019 16:30:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Macro-for-todays-date-and-time/m-p/578499#M13360</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-08-01T16:30:56Z</dc:date>
    </item>
  </channel>
</rss>

