<?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: problem with date format in SAS studio in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/problem-with-date-format-in-SAS-studio/m-p/674005#M202876</link>
    <description>&lt;P&gt;You have not supplied a sample data nor expected results.&lt;/P&gt;
&lt;P&gt;You can remove first step and try next code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
  create table reportsummary as 
  select reportName, 
         count(key_num_acct) as reports_vol 
  from permdata.reportreferrals
  where reportDT = today() - 2. 
  group by reportName;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 02 Aug 2020 18:19:50 GMT</pubDate>
    <dc:creator>Shmuel</dc:creator>
    <dc:date>2020-08-02T18:19:50Z</dc:date>
    <item>
      <title>problem with date format in SAS studio</title>
      <link>https://communities.sas.com/t5/SAS-Programming/problem-with-date-format-in-SAS-studio/m-p/674003#M202874</link>
      <description>&lt;P&gt;solved&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Oct 2020 07:36:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/problem-with-date-format-in-SAS-studio/m-p/674003#M202874</guid>
      <dc:creator>jepafob</dc:creator>
      <dc:date>2020-10-01T07:36:21Z</dc:date>
    </item>
    <item>
      <title>Re: problem with date format in SAS studio</title>
      <link>https://communities.sas.com/t5/SAS-Programming/problem-with-date-format-in-SAS-studio/m-p/674005#M202876</link>
      <description>&lt;P&gt;You have not supplied a sample data nor expected results.&lt;/P&gt;
&lt;P&gt;You can remove first step and try next code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
  create table reportsummary as 
  select reportName, 
         count(key_num_acct) as reports_vol 
  from permdata.reportreferrals
  where reportDT = today() - 2. 
  group by reportName;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 02 Aug 2020 18:19:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/problem-with-date-format-in-SAS-studio/m-p/674005#M202876</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2020-08-02T18:19:50Z</dc:date>
    </item>
    <item>
      <title>Re: problem with date format in SAS studio</title>
      <link>https://communities.sas.com/t5/SAS-Programming/problem-with-date-format-in-SAS-studio/m-p/674006#M202877</link>
      <description>&lt;P&gt;Macro variables SHOULD NOT be formatted.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
    call symput('today',intnx('day',today(),-2));
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/88384"&gt;@Shmuel&lt;/a&gt; has a simpler approach. &lt;/P&gt;</description>
      <pubDate>Sun, 02 Aug 2020 18:30:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/problem-with-date-format-in-SAS-studio/m-p/674006#M202877</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-08-02T18:30:43Z</dc:date>
    </item>
    <item>
      <title>Re: problem with date format in SAS studio</title>
      <link>https://communities.sas.com/t5/SAS-Programming/problem-with-date-format-in-SAS-studio/m-p/674007#M202878</link>
      <description>&lt;P&gt;Why would you want to compare REPORTDT to a number that is less than 1 thousandths?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;625   data test;
626     x=31/07/2020 ;
627     put x=;
628   run;

x=0.0021923621
&lt;/PRE&gt;
&lt;P&gt;Isn't REPORTDT a DATE variable?&amp;nbsp; Wouldn't you want to compare it to another date value?&amp;nbsp;&amp;nbsp; The date value for 31JUL2020 is&amp;nbsp;22127.&lt;/P&gt;
&lt;P&gt;Either set the macro variable to the number of days.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;call symputX('today',today()-2);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or set it to a string that the DATE informat can recognize and use it make a date literal in your later code.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;call symputX('today',put(today()-2,date9.));
...
where reportDT = "&amp;amp;today"d&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 02 Aug 2020 19:59:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/problem-with-date-format-in-SAS-studio/m-p/674007#M202878</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-08-02T19:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: problem with date format in SAS studio</title>
      <link>https://communities.sas.com/t5/SAS-Programming/problem-with-date-format-in-SAS-studio/m-p/674013#M202882</link>
      <description>&lt;P&gt;Maxim 28.&lt;/P&gt;</description>
      <pubDate>Sun, 02 Aug 2020 20:31:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/problem-with-date-format-in-SAS-studio/m-p/674013#M202882</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-08-02T20:31:05Z</dc:date>
    </item>
  </channel>
</rss>

