<?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: In a custom warning/error: how to get a date value to show up with a format in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/In-a-custom-warning-error-how-to-get-a-date-value-to-show-up/m-p/938841#M368719</link>
    <description>&lt;P&gt;data _null_;&lt;BR /&gt;thisdate=today();&lt;BR /&gt;rptdate = (today()+1);&lt;BR /&gt;format rptdate date9.;&lt;BR /&gt;if (thisdate&amp;lt;rptdate) then put "WARNING: future RPTDATE. rpdate=" rptdate;&lt;BR /&gt;run;&lt;/P&gt;</description>
    <pubDate>Fri, 09 Aug 2024 20:24:27 GMT</pubDate>
    <dc:creator>A_Kh</dc:creator>
    <dc:date>2024-08-09T20:24:27Z</dc:date>
    <item>
      <title>In a custom warning/error: how to get a date value to show up with a format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/In-a-custom-warning-error-how-to-get-a-date-value-to-show-up/m-p/938831#M368717</link>
      <description>&lt;P&gt;This code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
    thisdate=today();
    rptdate = (today()+1);
    if (thisdate&amp;lt;rptdate) then put "WARNING: future RPTDATE.  " rptdate=;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;generates this warning&lt;/P&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;WARNING: future RPTDATE.  rptdate=23598         .&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Is there a way to get the rptdate output in the warning to the log, to appear with a date format?&lt;/P&gt;
&lt;P&gt;like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;WARNING: future RPTDATE.   rptdate=10AUG2024
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Thanks in advance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2024 20:03:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/In-a-custom-warning-error-how-to-get-a-date-value-to-show-up/m-p/938831#M368717</guid>
      <dc:creator>mcook</dc:creator>
      <dc:date>2024-08-09T20:03:15Z</dc:date>
    </item>
    <item>
      <title>Re: In a custom warning/error: how to get a date value to show up with a format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/In-a-custom-warning-error-how-to-get-a-date-value-to-show-up/m-p/938841#M368719</link>
      <description>&lt;P&gt;data _null_;&lt;BR /&gt;thisdate=today();&lt;BR /&gt;rptdate = (today()+1);&lt;BR /&gt;format rptdate date9.;&lt;BR /&gt;if (thisdate&amp;lt;rptdate) then put "WARNING: future RPTDATE. rpdate=" rptdate;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2024 20:24:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/In-a-custom-warning-error-how-to-get-a-date-value-to-show-up/m-p/938841#M368719</guid>
      <dc:creator>A_Kh</dc:creator>
      <dc:date>2024-08-09T20:24:27Z</dc:date>
    </item>
    <item>
      <title>Re: In a custom warning/error: how to get a date value to show up with a format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/In-a-custom-warning-error-how-to-get-a-date-value-to-show-up/m-p/938842#M368720</link>
      <description>&lt;P&gt;Bah.&amp;nbsp; I'm an idiot.&amp;nbsp; Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2024 20:26:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/In-a-custom-warning-error-how-to-get-a-date-value-to-show-up/m-p/938842#M368720</guid>
      <dc:creator>mcook</dc:creator>
      <dc:date>2024-08-09T20:26:09Z</dc:date>
    </item>
    <item>
      <title>Re: In a custom warning/error: how to get a date value to show up with a format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/In-a-custom-warning-error-how-to-get-a-date-value-to-show-up/m-p/938852#M368722</link>
      <description>&lt;P&gt;Or just add the forma to the PUT statement:&lt;/P&gt;
&lt;PRE&gt;data _null_;
    thisdate=today();
    rptdate = (today()+1);
    if (thisdate&amp;lt;rptdate) then put "WARNING: future RPTDATE.  " rptdate= date9.;
run;&lt;/PRE&gt;</description>
      <pubDate>Fri, 09 Aug 2024 21:00:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/In-a-custom-warning-error-how-to-get-a-date-value-to-show-up/m-p/938852#M368722</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-08-09T21:00:11Z</dc:date>
    </item>
  </channel>
</rss>

