<?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: comparing date in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/comparing-date/m-p/698026#M37498</link>
    <description>data test;&lt;BR /&gt;    date = '23dec2020'd;&lt;BR /&gt;	date2=2020-12-23;/*yyyy-mm-dd*/&lt;BR /&gt;    if date1 eq date2 then &lt;BR /&gt;	do;&lt;BR /&gt;		flag=1;&lt;BR /&gt;	end; &lt;BR /&gt;	else &lt;BR /&gt;	do;&lt;BR /&gt;		flag=0;&lt;BR /&gt;	end; &lt;BR /&gt;run;</description>
    <pubDate>Tue, 10 Nov 2020 21:49:11 GMT</pubDate>
    <dc:creator>alepage</dc:creator>
    <dc:date>2020-11-10T21:49:11Z</dc:date>
    <item>
      <title>comparing date</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/comparing-date/m-p/698014#M37494</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have two datasets.&amp;nbsp; In the first one, the var date1 as the date format 23dec2020 while in the other dataset, the date2 as the following date format : 2020-12-23 (yyyy-mm-dd).&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I bring back both to numerical value ex; 22272 in order to compare both dataset.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2020 21:29:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/comparing-date/m-p/698014#M37494</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2020-11-10T21:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: comparing date</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/comparing-date/m-p/698015#M37495</link>
      <description>&lt;P&gt;According to PROC CONTENTS, is date1 character or numeric? According to PROC CONTENTS, is date2 character or numeric?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2020 21:31:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/comparing-date/m-p/698015#M37495</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-11-10T21:31:43Z</dc:date>
    </item>
    <item>
      <title>Re: comparing date</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/comparing-date/m-p/698020#M37496</link>
      <description>it seems that they are both numeric but not using the same format</description>
      <pubDate>Tue, 10 Nov 2020 21:41:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/comparing-date/m-p/698020#M37496</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2020-11-10T21:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: comparing date</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/comparing-date/m-p/698024#M37497</link>
      <description>&lt;P&gt;For numeric variables, format doesn't matter when you compare variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if date1&amp;lt;date2 then ... ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;works regardless of format. Formats just change the appearance, they don't affect the actual date values.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2020 21:46:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/comparing-date/m-p/698024#M37497</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-11-10T21:46:27Z</dc:date>
    </item>
    <item>
      <title>Re: comparing date</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/comparing-date/m-p/698026#M37498</link>
      <description>data test;&lt;BR /&gt;    date = '23dec2020'd;&lt;BR /&gt;	date2=2020-12-23;/*yyyy-mm-dd*/&lt;BR /&gt;    if date1 eq date2 then &lt;BR /&gt;	do;&lt;BR /&gt;		flag=1;&lt;BR /&gt;	end; &lt;BR /&gt;	else &lt;BR /&gt;	do;&lt;BR /&gt;		flag=0;&lt;BR /&gt;	end; &lt;BR /&gt;run;</description>
      <pubDate>Tue, 10 Nov 2020 21:49:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/comparing-date/m-p/698026#M37498</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2020-11-10T21:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: comparing date</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/comparing-date/m-p/698027#M37499</link>
      <description>data test;&lt;BR /&gt;    date1 = '23dec2020'd;&lt;BR /&gt;	date2=2020-12-23;/*yyyy-mm-dd*/&lt;BR /&gt;    if date1 eq date2 then &lt;BR /&gt;	do;&lt;BR /&gt;		flag=1;&lt;BR /&gt;	end; &lt;BR /&gt;	else &lt;BR /&gt;	do;&lt;BR /&gt;		flag=0;&lt;BR /&gt;	end; &lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;The flag value should gives one...</description>
      <pubDate>Tue, 10 Nov 2020 21:50:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/comparing-date/m-p/698027#M37499</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2020-11-10T21:50:35Z</dc:date>
    </item>
    <item>
      <title>Re: comparing date</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/comparing-date/m-p/698032#M37502</link>
      <description>&lt;P&gt;Date2 is not a SAS date value, nor is it formatted as YYYY-MM-DD.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Date2 is 2020 minus 12 minus 23, which is ... well you do the math.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want Date 2 to be a SAS date value, you should use this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;date2=input('2020-12-23',yymmdd10.);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Nov 2020 22:02:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/comparing-date/m-p/698032#M37502</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-11-10T22:02:59Z</dc:date>
    </item>
  </channel>
</rss>

